Sha256: d0853bc373b1328b34266c0530b0fcde7bb21fd2409f287e150325905f1c5f37

Contents?: true

Size: 500 Bytes

Versions: 6

Compression:

Stored size: 500 Bytes

Contents

module EffectiveEmailTemplatesHelper

  def effective_email_review_fields(form, template_name)
    email_review = form.object.email_review

    unless email_review&.template_name == template_name.to_s
      email_template = Effective::EmailTemplate.where(template_name: template_name).first!
      email_review = Effective::EmailReview.build(email_template: email_template)
    end

    render(partial: 'effective/email_reviews/fields', locals: { email_review: email_review, form: form })
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
effective_email_templates-1.0.9 app/helpers/effective_email_templates_helper.rb
effective_email_templates-1.0.8 app/helpers/effective_email_templates_helper.rb
effective_email_templates-1.0.7 app/helpers/effective_email_templates_helper.rb
effective_email_templates-1.0.6 app/helpers/effective_email_templates_helper.rb
effective_email_templates-1.0.5 app/helpers/effective_email_templates_helper.rb
effective_email_templates-1.0.4 app/helpers/effective_email_templates_helper.rb