Skip to content

Commit

Permalink
[#412] Added stripping users emails from whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
unijewski committed Feb 19, 2015
1 parent bb2f413 commit a80fcea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/admin/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def edit
# POST /admin/users.xml AJAX
#----------------------------------------------------------------------------
def create
params[:user][:email].strip!
params[:user][:password_confirmation] = nil if params[:user][:password_confirmation].blank?
admin = params[:user].delete(:admin)
@user = User.new(params[:user])
Expand All @@ -57,6 +58,7 @@ def create
# PUT /admin/users/1.xml AJAX
#----------------------------------------------------------------------------
def update
params[:user][:email].strip!
params[:user][:password_confirmation] = nil if params[:user][:password_confirmation].blank?
admin = params[:user].delete(:admin)
@user = User.find(params[:id])
Expand Down
1 change: 1 addition & 0 deletions app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def edit
# PUT /users/1.js
#----------------------------------------------------------------------------
def update
params[:user][:email].strip!
@user.update_attributes(params[:user])
respond_with(@user)
end
Expand Down

0 comments on commit a80fcea

Please sign in to comment.