I would like to have access to the user information in the invitation/accept route. When I go to the form and use
<%= resource.name %>
it won't display the User. It also appears that it isn't loading the user during the accept. Is there an easy way to show the user some information about the invite?
I can think of two options:
You could override the devise invitable controller, see: Anyone have experience with devise_invitable?
In my case, I wanted to pass the name of the invitor.
... <%= f.text_field :invitor, :value => current_user.id, :hidden => true %> ...
... <%= (User.find @resource.invitor).name %> has invited you to <%= root_url %>, you can accept it through the link below....
Not that elegant, but it works. Improvements that survive updates of the devise_invitable gem are welcome.