clarion/app/controllers/management/users_controller.rb

24 lines
358 B
Ruby
Raw Normal View History

module Management
class UsersController < ManagementController
def index
@users = User.all
end
def toggle_admin
2015-05-10 13:36:29 +03:00
@user = find_user
2014-09-17 17:48:46 +03:00
@user.toggle_admin!
end
def show
2015-05-10 13:36:29 +03:00
@user = find_user
@profile = @user.speaker_profile
end
private
2015-05-10 13:36:29 +03:00
def find_user
User.find(params[:id])
end
end
end