Class: Admin::Atreides::UsersController

Inherits:
Atreides::AdminController
  • Object
show all
Includes:
Atreides::Extendable
Defined in:
app/controllers/admin/atreides/users_controller.rb

Instance Method Summary collapse

Instance Method Details

#adminsObject



22
23
24
25
# File 'app/controllers/admin/atreides/users_controller.rb', line 22

def admins
  @users = end_of_association_chain.admins.paginate(:page => params[:page])
  render "index"
end

#createObject



9
10
11
12
13
14
# File 'app/controllers/admin/atreides/users_controller.rb', line 9

def create
  super do |success, failure|
    success.html { redirect_to admin_users_path, :notice => t('devise.registrations.signed_up') }
    failure.html { render 'new' }
  end
end

#showObject



3
4
5
6
7
# File 'app/controllers/admin/atreides/users_controller.rb', line 3

def show
  super do |wants|
    wants.html { redirect_to edit_admin_user_path(resource), :flash => flash }
  end
end

#updateObject



16
17
18
19
20
# File 'app/controllers/admin/atreides/users_controller.rb', line 16

def update
  super do |success, failure|
    success.html { redirect_to admin_users_path }
  end
end