Module: Hobo::MailerHelper

Defined in:
lib/hobo/extensions/action_mailer/helper.rb

Defined Under Namespace

Modules: ClassMethods

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#app_nameObject (readonly)

Returns the value of attribute app_name.



3
4
5
# File 'lib/hobo/extensions/action_mailer/helper.rb', line 3

def app_name
  @app_name
end

#hostObject (readonly)

Returns the value of attribute host.



3
4
5
# File 'lib/hobo/extensions/action_mailer/helper.rb', line 3

def host
  @host
end

Instance Method Details

#initializeObject



5
6
7
8
9
10
11
12
13
14
# File 'lib/hobo/extensions/action_mailer/helper.rb', line 5

def initialize(*)
  super
  @app_name = Rails.application.config.hobo.app_name
  if self.class.default_url_options.empty?
    # might be set later in the before filter so we try to set it here
    d = Rails.application.config.action_mailer.default_url_options
    self.class.default_url_options = d.dup if d
  end
  @host = self.class.default_url_options[:host]
end