I would like to create a string that include a path for an object in Rails.
def notification_content
"#{app.listing_url(my_listing, :host => "example.com")}. " +
end
This content will then be fed into my ActionMailer as email content.
In console, it works fine. However, when I run it on localhost server, I get the following error:
undefined local variable or method `app'
How should I go about it? Also, how can I make the path to be a hyperlink?
Thanks a lot.