Sha256: bdc923a0c79195b88bd40f531191637b0f53f4e91b114332af364471eda35aa9

Contents?: true

Size: 1.66 KB

Versions: 1

Compression:

Stored size: 1.66 KB

Contents

o:$YARD::CodeObjects::MethodObject:@current_file_has_commentsT:
@lineiI:@signature"(def set_layout_and_partials(format):@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:
@tags[:@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:endiH:
beginiH:	exclF:@namespaceu;ActionMailer::Base:@files[["+lib/mail_engine/action_mailer_patch.rbiI:
@name:set_layout_and_partials:
@dynamicT:
@path"/ActionMailer::Base#set_layout_and_partials:@parameters[["format0:@docstring_extra0:@visibility:protected:@source_type:	ruby:@explicitT

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mail_engine-0.1.0 .yardoc/objects/ActionMailer/Base/set_layout_and_partials_i.dat