Commit f088c867a4b03104c349b9037198a895d1968f34
1 parent
2ab76ca5
Exists in
master
and in
4 other branches
Fix signup for rails4
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
1 changed file
with
6 additions
and
0 deletions
Show diff stats
app/controllers/application_controller.rb
... | ... | @@ -9,6 +9,7 @@ class ApplicationController < ActionController::Base |
9 | 9 | before_filter :dev_tools if Rails.env == 'development' |
10 | 10 | before_filter :default_headers |
11 | 11 | before_filter :add_gon_variables |
12 | + before_filter :configure_permitted_parameters, if: :devise_controller? | |
12 | 13 | |
13 | 14 | protect_from_forgery |
14 | 15 | |
... | ... | @@ -201,4 +202,9 @@ class ApplicationController < ActionController::Base |
201 | 202 | formats: [:html] |
202 | 203 | ) |
203 | 204 | end |
205 | + | |
206 | + def configure_permitted_parameters | |
207 | + devise_parameter_sanitizer.for(:sign_in) { |u| u.permit(:username, :email, :password) } | |
208 | + devise_parameter_sanitizer.for(:sign_up) { |u| u.permit(:username, :email, :name, :password, :password_confirmation) } | |
209 | + end | |
204 | 210 | end | ... | ... |