Module: ActionmailerHostAutoset::ActionMailer
- Defined in:
- lib/actionmailer_host_autoset/actionmailer_host_autoset.rb
Class Method Summary collapse
Class Method Details
.included(am) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/actionmailer_host_autoset/actionmailer_host_autoset.rb', line 31 def self.included(am) am.send(:include, ::ActionController::UrlWriter) am.class_eval do if ENV['RAILS_ENV'] == 'test' [:host] = 'test.host' [:protocol] = 'http' else [:host] = 'localhost' [:protocol] = 'http' end end end |