I would like to create a string containing the path for an object in Rails.
def notification_content "#{app.listing_url(my_listing, :host => "example.com")}. " + end
This content will be transferred to my ActionMailer as email content.
It works great in the console. However, when I run it on the local server, I get the following error:
undefined local variable or method `app'
How can I do it? Also, how can I make the path a hyperlink?
Many thanks.
url ruby-on-rails actionmailer
AdamNyc
source share