Sha256: 0266cb44656d2a654330318b587dccbf176b444b76857bf64d10624e401b680b

Contents?: true

Size: 1.66 KB

Versions: 6

Compression:

Stored size: 1.66 KB

Contents

o:$YARD::CodeObjects::MethodObject:@visibility:protected:@source_type:	ruby:@scope:
instance:@source"ødef set_layout_and_partials(format)
  # looking for system mail.
  template = MailEngine::MailTemplate.where(:path => "#{controller_path}/#{action_name}", :format => format, :locale => I18n.locale, :partial => false, :for_marketing => false).first
  # looking for marketing mail.
  template = MailEngine::MailTemplate.where(:path => action_name, :format => format, :locale => I18n.locale, :partial => false, :for_marketing => true).first if template.blank?

  # if found db template set the layout and partial for it.
  if template
    related_partial_paths = {}
    # set @footer or @header
    template.template_partials.each do |tmp|
      related_partial_paths["#{tmp.placeholder_name}_path".to_sym] = tmp.partial.path
    end

    # set layout
    render :template => "#{controller_path}/#{action_name}", :layout => "layouts/mail_engine/mail_template_layouts/#{template.layout}", :locals => related_partial_paths
  else
    # if not found db template should render file template
    render(action_name)
 end
end:@explicitT:
@tags[:@current_file_has_commentsT:
@lineiI:@signature"(def set_layout_and_partials(format):@files[["+lib/mail_engine/action_mailer_patch.rbiI:
@name:set_layout_and_partials:
@path"/ActionMailer::Base#set_layout_and_partials:@docstringIC:YARD::Docstring"set layout and partials:	@all["set layout and partials:@line_rangeo:
Range:endiH:
beginiH:	exclF;[:@ref_tags[:
@summary0:@objectu:YARD::StubProxy/ActionMailer::Base#set_layout_and_partials:@namespaceu;!ActionMailer::Base:
@dynamicT:@parameters[["format0:@docstring_extra0

Version data entries

6 entries across 6 versions & 1 rubygems

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