Skip to content

Commit

Permalink
Fix problem with first and last name being updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Neil Gehani committed Sep 17, 2013
1 parent 2b40a6a commit 846b504
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
#protect_from_forgery with: :exception
before_filter :configure_permitted_parameters, if: :devise_controller?

protected

def configure_permitted_parameters
devise_parameter_sanitizer.for(:sign_up) { |u| u.permit(:first_name, :last_name, :email, :password, :password_confirmation) }
devise_parameter_sanitizer.for(:account_update) { |u| u.permit(:first_name, :last_name, :email, :current_password, :password, :password_confirmation) }
end

end

0 comments on commit 846b504

Please sign in to comment.