-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined local variable or method `account' #22
Comments
Not a dumb question at all, I definitely need to expand and clean up the documentation. The "account" is a resource you're inviting people to join for this particular example. You would plug in whatever resource your users are sending invites to join. In this example, I was using the Basecamp-style concept of account. |
You're getting 'undefined method: invitable_name'. The method invitable_name is added by the class Company < ActiveRecord::Base
invitable named_by: :name
end Here, Company has an attribute 'name' that is used as the 'invitable_name'. Anytime an invitation is generated to a Company resource, the invitable_name (which fetches |
Thanks! I have no errors now. Just one more question, if i wanted to over ride the config/locales/invitation.en.yml default messages how can I? I saw something about i18n translations. I just never worked with it before. Also, I have no errors but the email doesn't actually send through. I changed the initializer/invitation.rb sender email. Do I have to use a third party app like sendgrid for the actual message to deliver? I see in the invites_controller.rb file theres a method 'def deliver_email' and it uses the deliver_later gem. However, that gem is outdated and not maintained anymore. |
The default translations live in the gem at Regarding sending email: you're correct, you'll need to configure your rails app to send email through... something. It could be your local host, but I would recommend using a service like Sendgrid. I use Sendgrid on heroku, it's easy to use and it's free for low-volume apps. |
Hi, might be a dumb question but for some reason when I put this code in my views I get this error. undefined local variable or method `account'
I should be defining account as a variable in my controller right?
new_invite_path(invite: { invitable_id: account.id, invitable_type: 'Account' } ) %>``
The text was updated successfully, but these errors were encountered: