Change update/save failures to use flash type :error instead of :alert

This commit is contained in:
Nishanth Vijayan 2016-03-16 11:20:56 +05:30
parent 19c54bd935
commit 1c1e56ed46
10 changed files with 13 additions and 13 deletions

View file

@ -30,7 +30,7 @@ module Admin
if @user.update_attributes(user_params)
redirect_to admin_users_path, notice: "Updated #{@user.name} (#{@user.email})!" + message
else
redirect_to admin_users_path, alert: "Could not update #{@user.name} (#{@user.email}). #{@user.errors.full_messages.join('. ')}."
redirect_to admin_users_path, error: "Could not update #{@user.name} (#{@user.email}). #{@user.errors.full_messages.join('. ')}."
end
end