Chce skonfigurowac Action Mailer w pliku development.rb ale postepujac zgodnie z tym railscastem: http://railscasts.com/episodes/85-yaml-configuration-file/ dostaje blad przy uruchomieniu aplikacji:
development.rb:48:in `block in <top (required)>': uninitialized constant EMAIL_CONFIG (NameError)
plik development.rb
#Action Mailer
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:domain => "gmail.com",
:user_name => EMAIL_CONFIG['login'],
:password => EMAIL_CONFIG['password'],
:authentication => "plain",
:enable_starttls_auto => true
}
plik initializers/load_email_config.rb
EMAIL_CONFIG = YAML.load_file("#{Rails.root}/config/email.yml")[Rails.env]
plik config/email.yml
development:
login:
password
Czemu stala EMAIL_CONFIG nie jest widoczna w pliku development.rb ?