I am working on invitations per this railscast and I am using devise for authentication in my app. I would like to get this bit of code implemented:
def new
@user = User.new(:invitation_token => params[:invitation_token])
@user.email = @user.invitation.recipient_email if @user.invitation
end
inside of devise. This involves overriding the registrations controller. Here is the new action that is in the registrations controller:
def new
resource = build_resource({})
respond_with resource
end
I am relatively new to coding and made an attempt to sift through the devise code and figure out what's going on, but seems daunting. Is there something simple to this? How can I get that code implemented by overriding the devise registrations controller?