File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11class UsersController < InheritedController
22 load_and_authorize_resource
33 skip_authorize_resource :only => [ :following , :followers ] #anyone can perform these read-only actions
4+
45 require 'will_paginate/array'
56
67 def index
7- @users = User . all . paginate ( :page => params [ :page ] , :per_page => 1 )
8- respond_to do |format |
9- format . html
10- end
8+ redirect_to root_path unless current_user and current_user . moderator
9+ @users = User . all . paginate ( :page => params [ :page ] , :per_page => 10 )
1110 end
1211
1312 def follow
Original file line number Diff line number Diff line change 11= semantic_menu :class => " nav secondary-nav" do |root|
22 - if current_user
3+ - if current_user.moderator
4+ - root.add " Send an Email" , users_index_path
35 - root.add current_user.username, user_path(current_user)
46 - root.add " Log Out" , logout_path
57 - else
You can’t perform that action at this time.
0 commit comments