Sha256: 40934ee4434a7bf51a49f56e197bb8ef29f9bb9cb9fe50252d366375be3e3ac1

Contents?: true

Size: 1.66 KB

Versions: 9

Compression:

Stored size: 1.66 KB

Contents

o:$YARD::CodeObjects::MethodObject:@current_file_has_commentsT:
@linei_:@scope:
instance:@docstringIC:YARD::Docstring"set layout and partials:@ref_tags[:@objectu:YARD::StubProxy/ActionMailer::Base#set_layout_and_partials:
@summary0:	@all["set layout and partials:@line_rangeo:
Range:endi^:
begini^:	exclF:
@tags[:@parameters[["format0:@namespaceu;ActionMailer::Base:@files[["+lib/mail_engine/action_mailer_patch.rbi_:
@name:set_layout_and_partials:
@dynamicT:
@path"/ActionMailer::Base#set_layout_and_partials:@docstring_extra0:@visibility:protected:@source_type:	ruby:@signature"(def set_layout_and_partials(format):@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;[

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mail_engine-0.1.15 .yardoc/objects/ActionMailer/Base/set_layout_and_partials_i.dat
mail_engine-0.1.14 .yardoc/objects/ActionMailer/Base/set_layout_and_partials_i.dat
mail_engine-0.1.13 .yardoc/objects/ActionMailer/Base/set_layout_and_partials_i.dat
mail_engine-0.1.12 .yardoc/objects/ActionMailer/Base/set_layout_and_partials_i.dat
mail_engine-0.1.11 .yardoc/objects/ActionMailer/Base/set_layout_and_partials_i.dat
mail_engine-0.1.10 .yardoc/objects/ActionMailer/Base/set_layout_and_partials_i.dat
mail_engine-0.1.9 .yardoc/objects/ActionMailer/Base/set_layout_and_partials_i.dat
mail_engine-0.1.8 .yardoc/objects/ActionMailer/Base/set_layout_and_partials_i.dat
mail_engine-0.1.7 .yardoc/objects/ActionMailer/Base/set_layout_and_partials_i.dat