mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
base controller
Conflicts: app/controllers/admin/commercials_controller.rb app/controllers/admin/questions_controller.rb app/controllers/admin/users_controller.rb
This commit is contained in:
parent
336d0e9d04
commit
17ebad413e
29 changed files with 48 additions and 31 deletions
|
|
@ -1,5 +1,5 @@
|
|||
module Admin
|
||||
class UsersController < ApplicationController
|
||||
class UsersController < Admin::BaseController
|
||||
load_and_authorize_resource
|
||||
|
||||
def new
|
||||
|
|
@ -21,9 +21,9 @@ module Admin
|
|||
|
||||
def update
|
||||
if @user.update_attributes(params[:user])
|
||||
redirect_to admin_users_path, notice: "Updated #{@user.email}"
|
||||
redirect_to admin_users_path, notice: "Updated #{@user.name} (#{@user.email})!"
|
||||
else
|
||||
redirect_to admin_users_path, alert: "Could not update #{@user.name}. #{@user.errors.full_messages.join '. '}."
|
||||
redirect_to admin_users_path, alert: "Could not update #{@user.name} (#{@user.email}). #{@user.errors.full_messages.join('. ')}."
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue