I'm new at ruby on rails, and I've noticed that when I send an email, my site_name and site_url vars are not being recognized from the mailer files.
In my config.yml file I've got the following:
development: &local
site_name: my site name
site_url: http://localhost:8282
company_name: my company name
admin_email: admin@domain.com
support_name: askdjaskd Support
support_email: support@domain.com
production:
<<: *local
staging:开发者_StackOverflow中文版
<<: *local
test:
<<: *local
And in the mailers I call them the as follows:
@body[:url] = "http://#{Setting.get(:site_url)}/"
Do I need to write a require statement at the beginning of the mailers? If not, what am I missing?
Thanks, Brian
I've solved it! Instead of Settings.get(:site_url)
, I'm using configatron.site_url
and it works!
Thank you!
Brian
精彩评论