-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix problem with first and last name being updated
- Loading branch information
Neil Gehani
committed
Sep 17, 2013
1 parent
2b40a6a
commit 846b504
Showing
1 changed file
with
10 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |