removed the puts, initial token checking

This commit is contained in:
ilya 2010-10-16 00:42:37 -07:00
parent 2735cb026d
commit f33298e762

View file

@ -4,9 +4,10 @@
class InvitationsController < Devise::InvitationsController
before_filter :check_token, :only => [:edit]
def create
puts params.inspect
begin
params[:user][:aspect_id] = params[:user].delete(:aspects)
self.resource = current_user.invite_user(params[resource_name])
@ -39,4 +40,13 @@ class InvitationsController < Devise::InvitationsController
redirect_to new_user_registration_path
end
end
protected
def check_token
if User.find_by_invitation_token(params['invitation_token']).nil?
flash[:error] = "Invitation token not found"
redirect_to root_url
end
end
end