summaryrefslogtreecommitdiff
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2013-07-26 20:18:52 -0600
committermo khan <mo@mokhan.ca>2013-07-26 20:18:52 -0600
commit37a3e5b5d8b9a8802a29e519e3f657ea307f97af (patch)
treec99dad959840c08936c9b6880263b19f4b1fb73b /app/controllers/application_controller.rb
parenta9e445a372e71be3f1aaeb7f1dd0048a66df90e3 (diff)
fix the registration spec
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index f9a5d663..0db1df02 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -5,6 +5,7 @@ class ApplicationController < ActionController::Base
before_filter :profile_application
before_filter :load_categories
before_filter :load_user
+ before_filter :configure_permitted_parameters, if: :devise_controller?
private
@@ -18,7 +19,7 @@ class ApplicationController < ActionController::Base
def load_categories
#@categories = Rails.cache.fetch("categories-#{Category.count}") do
- #Category.all
+ #Category.all
#end
@categories = Category.all
end
@@ -26,4 +27,11 @@ class ApplicationController < ActionController::Base
def load_user
@user = current_user if current_user
end
+
+ protected
+
+ def configure_permitted_parameters
+ devise_parameter_sanitizer.for(:user) { |u| u.permit(:name, :city, :email) }
+ end
end
+