Reload configuration after Rails initializer -
in environment.rb
, rails configured in initializer block:
rails::initializer.run |config| config.action_mailer.smtp_settings = settings end
this propagates push various config settings framework classes actionmailer::base.smtp_settings.
if need reconfigure outside initializer.run block, can set:
rails.configuration.action_mailer.smtp_settings = new_settings
but in case it's not picked in actionmailer::base.smtp_settings.
is there way make rails "push" updated configuration again? or best reconfigure actionmailer::base directly , not worry rails.configuration out of sync it?
you should use actionmailer::base class. point of using rails.configuration able set various options before actual code loaded. if need change afterwards, there no need use rails.configuration.
Comments
Post a Comment