diff --git a/app/controllers/admins_controller.rb b/app/controllers/admins_controller.rb index fbd1ed0a5..0753e2e2e 100644 --- a/app/controllers/admins_controller.rb +++ b/app/controllers/admins_controller.rb @@ -11,10 +11,12 @@ class AdminsController < ApplicationController def admin_inviter user = User.find_by_email params[:idenitifer] unless user - Invitation.create(:service => 'email', :identifer => params[:identifier], :admin => true) + Invitation.create(:service => 'email', :identifier => params[:identifier], :admin => true) flash[:notice] = "invitation sent to #{params[:identifier]}" + else + flash[:notice]= "error sending invite to #{params[:identifier]}" end - redirect_to user_search_path + redirect_to user_search_path, :notice => flash[:notice] end def stats diff --git a/db/schema.rb b/db/schema.rb index f6a25ff19..5f7edde5f 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -394,8 +394,7 @@ ActiveRecord::Schema.define(:version => 20110818212541) do t.string "language" t.string "email", :default => "", :null => false t.string "encrypted_password", :limit => 128, :default => "", :null => false - t.string "password_salt", :default => "", :null => false - t.string "invitation_token", :limit => 20 + t.string "invitation_token", :limit => 60 t.datetime "invitation_sent_at" t.string "reset_password_token" t.string "remember_token"