On 29 June 2010 11:00, Neil Bye <li...@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?
You haven't given anywhere enough detail for us to help you. @current_story - what are you expecting this variable to contain? Saying "the current page" won't help. Do you mean the current URL (@request.request_uri)? The current Page object (in which case you must have found the Page object using some code, assign that to @current_story. A variable from the session? @current_story = session[:current_story]. 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 -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.