Class: ActionMailer::Collector

Inherits:
Object
  • Object
show all
Defined in:
lib/mail_engine/action_mailer_patch.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) custom(mime, options = {})



101
102
103
104
105
106
107
108
109
# File 'lib/mail_engine/action_mailer_patch.rb', line 101

def custom(mime, options={})
  options.reverse_merge!(:content_type => mime.to_s)
  @context.freeze_formats([mime.to_sym])
  ### modified this line
  # change from:
  # options[:body] = block_given? ? yield : @default_render.call
  options[:body] = block_given? ? yield : @default_render.call(mime.to_sym)
  @responses << options
end