views:

37

answers:

1

Hi,

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: [email protected]

    support_name: askdjaskd Support
    support_email: [email protected]

production:
  <<: *local

staging:
  <<: *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

A: 

I've solved it! Instead of Settings.get(:site_url), I'm using configatron.site_url and it works!

Thank you!

Brian

Brian Roisentul