diff --git a/Gemfile b/Gemfile index 58b29b7..0dc25bf 100755 --- a/Gemfile +++ b/Gemfile @@ -84,3 +84,4 @@ gem 'rmagick' gem 'bootstrap-addons-rails' gem "jquery-fileupload-rails" +gem "seed_dump", "~> 0.5.3" diff --git a/Gemfile.lock b/Gemfile.lock index 5024fab..b7a77cb 100755 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -180,6 +180,7 @@ GEM railties (~> 3.2.0) sass (>= 3.1.10) tilt (~> 1.3) + seed_dump (0.5.3) simple_calendar (0.1.9) rails (>= 3.0) sprockets (2.2.2) @@ -239,6 +240,7 @@ DEPENDENCIES rolify rspec-rails sass-rails (~> 3.2) + seed_dump (~> 0.5.3) simple_calendar (~> 0.1.9) sqlite3 therubyracer diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 2bea1a1..2741498 100755 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1,21 +1,21 @@ class UsersController < ApplicationController - def index + def index @users = User.all - end - def add_role + end + def add_role @user= User.find(params[:id]) if (params[:role]=="fetuser" && can?(:addfetuser,User)) - @user.add_role(params[:role]) + @user.add_role(params[:role]) end if (params[:role]=="fetadmin" && can?(:addfetadmin,User)) - @user.add_role(params[:role]) + @user.add_role(params[:role]) end redirect_to users_url - end - def do_confirm + end + def do_confirm @user= User.find(params[:id]) @user.confirm! - + redirect_to users_url - end + end end