Ruby on Rails Monday, June 28, 2010

On 28 June 2010 10:22, Neil Bye <lists@ruby-forum.com> wrote:
> I am trying to send an email using ActionMailer. I am having problems
> identifying the recipient in email.controller. I want it to be the owner
> of the current story.
> It won't accept @story.user because I don't know how to make a
> relationship between the story model and the email model. Trouble is
> user_mailer won't accept belongs_to. Can anybody help?

:recipient => @story.user.email_address

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment