Ruby on Rails Thursday, May 5, 2016

On 5 May 2016 at 09:34, Artene Radu <lists@ruby-forum.com> wrote:
> Hello!
>
> I want to make my user model act as messageable.
> I added gem 'mailboxer', github: 'mailboxer/mailboxer' in the gem file.
> I added 'acts_as_messageable' in the user model.
>
> I assiged u1 = User.first
> u2 = User.find_by(id: 2)
> when I write the following command in console:
> u1.send_message u2, "body", "subject"
>
> I get the error:
> NoMethodError: undefined method `email' for
> #<Mailboxer::Message:0x00000007392c70>

Did you follow all the instructions here:
https://github.com/mailboxer/mailboxer

Also why are you installing direct from github? Doing that gives you
the latest development version rather than the released version.

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLud8aJi%3DuD_5MzMs9yfNC5QXxQ1nN%3DMP0mYpg2jb%3D-AWQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment