Skip to content
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.

Commit

Permalink
skip validations when setting view mode
Browse files Browse the repository at this point in the history
  • Loading branch information
orenyk committed Nov 13, 2014
1 parent 2f7f5b1 commit f85e601
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def set_view_mode
authorize! :view_as, :superuser
end
current_user.view_mode = params[:view_mode]
current_user.save!
current_user.save!(validate: false)
flash[:notice] = "Viewing as #{messages_hash[current_user.view_mode]}."
redirect_to(:back) and return
end
Expand Down

0 comments on commit f85e601

Please sign in to comment.