Sha256: 97fa3844660a662c420799bfed1c090c5e7932e5e58570b53380b485e4a065d9

Contents?: true

Size: 1.28 KB

Versions: 6

Compression:

Stored size: 1.28 KB

Contents

o:$YARD::CodeObjects::MethodObject:@visibility:public:@source_type:	ruby:@scope:
instance:@source"
def mail(headers={}, &block)
  # order by latest uploaded, for get the latest updated 'subject'
  current_template = MailEngine::MailTemplate.where(:path => "#{controller_path}/#{action_name}", :locale => I18n.locale, :partial => false).order("updated_at desc").first
  headers[:subject] = current_template.subject if headers[:subject].blank? && current_template.present?
  headers[:message_id] = "#{controller_path}/#{action_name}"

  # Add sendgrid header before sending mail.
  # Why here but not add to default_params of action_mailer? because the receiver email [:to] only can get here.
  if self.sendgrid_config
    self.sendgrid_config.add_to headers[:to]
    origin_mail(headers.merge(self.sendgrid_config.to_hash), &block)
  else
    origin_mail(headers, &block)
  end
end:@explicitT:
@tags[:@current_file_has_commentsF:
@linei
:@signature"!def mail(headers={}, &block):@files[["+lib/mail_engine/action_mailer_patch.rbi
:
@name:	mail:
@path"ActionMailer::Base#mail:@docstringIC:YARD::Docstring":	@all":@line_range0;[:@ref_tags[:
@summary0:@objectu:YARD::StubProxyActionMailer::Base#mail:@namespaceu;ActionMailer::Base:
@dynamicT:@parameters[["headers"{}["&block0

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mail_engine-0.1.6 .yardoc/objects/ActionMailer/Base/mail_i.dat
mail_engine-0.1.5 .yardoc/objects/ActionMailer/Base/mail_i.dat
mail_engine-0.1.4 .yardoc/objects/ActionMailer/Base/mail_i.dat
mail_engine-0.1.3 .yardoc/objects/ActionMailer/Base/mail_i.dat
mail_engine-0.1.2 .yardoc/objects/ActionMailer/Base/mail_i.dat
mail_engine-0.1.1 .yardoc/objects/ActionMailer/Base/mail_i.dat