Neil Bye wrote:
> Andy Jeffries wrote:
>> On 29 June 2010 11:00, Neil Bye <lists@ruby-forum.com> wrote:
>>
>>> I have this bit of code in my email.controller
>>>
>>> user = @current_user
>>> story = @current_story
>>> recipient = story.user
>>>
>>> It doesn't work because @current_story isn't defined. How can I find the
>>> current page to make this work?
>>
Neil
>> We need a lot more information to be able to help. @current_story is an
>> instance variable, but there's no information on what you're expecting
>> it to magically contain.
>>
>> Cheers,
>>
>> Andy
>
> The email is to be sent from a page containing a story and comments. I
> want it to go to @story.user's email. If I use story=
> Story.find_by_id(2) it works but I want an expression to find the
> current story not one specified.
> Does that tell you enough? Do you want more files sent?
Neil
Does anybody know how to do this? I've googled loads and still can't
work it out
Neil
--
Posted via http://www.ruby-forum.com/.
--
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