Class: Comable::Admin::UsersController
  
  
  
  
    
      Instance Method Summary
      collapse
    
    
  
  
  
  
  
  
  
  
  
  
  
  #current_ability, #respond_to_export_with
  
  
  
    Instance Method Details
    
      
  
  
    #edit  ⇒ Object 
  
  
  
  
    | 
23
24 | # File 'app/controllers/comable/admin/users_controller.rb', line 23
def edit
end
 | 
 
    
      
  
  
    #index  ⇒ Object 
  
  
  
  
    | 
10
11
12
13
14
15
16
17
18 | # File 'app/controllers/comable/admin/users_controller.rb', line 10
def index
  @q = Comable::User.ransack(params[:q])
  @users = @q.result.page(params[:page]).accessible_by(current_ability).by_newest
  respond_to do |format|
    format.html
    format.json { render json: @users }
  end
end
 | 
 
    
      
  
  
    #profile  ⇒ Object 
  
  
  
  
    | 
35
36
37
38 | # File 'app/controllers/comable/admin/users_controller.rb', line 35
def profile
  @user = current_comable_user
  render :edit
end
 | 
 
    
      
  
  
    #show  ⇒ Object 
  
  
  
  
    | 
20
21 | # File 'app/controllers/comable/admin/users_controller.rb', line 20
def show
end
 | 
 
    
      
  
  
    #update  ⇒ Object 
  
  
  
  
    | 
26
27
28
29
30
31
32
33 | # File 'app/controllers/comable/admin/users_controller.rb', line 26
def update
  if @user.update_attributes(user_params)
    redirect_to comable.admin_user_path(@user), notice: Comable.t('successful')
  else
    flash.now[:alert] = Comable.t('failure')
    render :edit
  end
end
 |