Closed nickisnoble closed 6 years ago
Hi nick, apologies for the late reply. The documentation definitely needs work, and you're not the first to get stuck on generating the invitable link. The docs there definitely need to be fleshed out and expanded.
Where does account come from in Usage?
The docs are mostly using the Basecamp-style concept of accounts (which is poorly explained several paragraphs above, in another section) for the given examples. The example showing a new_invite_path is generating an invitation to join a fictitious Basecamp-style Account (one Account that has many Users). To generate an invitation in your own project, you would plug in the appropriate invitable, replacing account.id
and 'Account'
with your own resource's id and type.
If you're stuck here, feel free to give me an example and I'll help you puzzle it out. You can also private message me on twitter at @JustinTomich.
Also, can you please include a Devise and possibly a Clearance example as well for User Registration Controllers?
A good idea, but probably not something I'll get to right away, if you have any interest in contributing to the part of the docs.
Where does
account
come from in Usage?<%= link_to 'invite a friend', new_invite_path(invite: { invitable_id: account.id, invitable_type: 'Account' } ) %>
Also, can you please include a Devise and possibly a Clearance example as well for User Registration Controllers?