I’m following a railscast episode on how to implement an invitation
It’s going really well, but i’ve hit a minor snag that I cant get
undefined method `generate_token’ for #Invitation:0x2563bf8
The invite form allows me to check for a user, and whether they
already have registered. If they have, the invitation is not sent, and
a flash message is printed.
If the email does not exist, the invite count (starts at 5) decrements
until you have none left.
When i click invite, i get the error above. It’s moaning about this
line: @invitation.sender = @user
i tied replacing @user with user, but still no use…
@invitation = Invitation.new(params[:invitation])
@invitation.sender = @user
flash[:notice] = “Thanks - Invitation sent successfully.”
render :action => ‘new’
Any ideas why this wont decrement, and why this error is still