aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/registrations_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/registrations_controller.rb')
-rw-r--r--app/controllers/registrations_controller.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb
new file mode 100644
index 000000000..f0ac420ce
--- /dev/null
+++ b/app/controllers/registrations_controller.rb
@@ -0,0 +1,17 @@
+ class RegistrationsController < Devise::RegistrationsController
+
+ prepend_before_filter :accept_user_creation, :only => [:new, :create]
+
+ private
+
+ def accept_user_creation
+ puts "J'y passe"
+ if !Rails.application.config.accept_user_creation
+ redirect_to root_path
+ return false
+ else
+ return true
+ end
+ end
+
+ end