Sha256: 1e6c77e675784df1f0bbbe3d5a753f2b2f4f5b451415fd948c24fa643a493ef0

Contents?: true

Size: 546 Bytes

Versions: 13

Compression:

Stored size: 546 Bytes

Contents

# == Schema Information
#
# Table name: template_partials
#
#  id               :integer         not null, primary key
#  placeholder_name :string(255)
#  mail_template_id :integer
#  partial_id       :integer
#

class MailEngine::TemplatePartial < ActiveRecord::Base
  validates_presence_of :partial_id, :placeholder_name

  belongs_to :mail_template
  belongs_to :partial, :class_name => "MailTemplate", :foreign_key => :partial_id

  scope :header, where(:placeholder_name => 'header')
  scope :footer, where(:placeholder_name => 'footer')
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
mail_engine-0.1.15 app/models/mail_engine/template_partial.rb
mail_engine-0.1.14 app/models/mail_engine/template_partial.rb
mail_engine-0.1.13 app/models/mail_engine/template_partial.rb
mail_engine-0.1.12 app/models/mail_engine/template_partial.rb
mail_engine-0.1.11 app/models/mail_engine/template_partial.rb
mail_engine-0.1.10 app/models/mail_engine/template_partial.rb
mail_engine-0.1.9 app/models/mail_engine/template_partial.rb
mail_engine-0.1.8 app/models/mail_engine/template_partial.rb
mail_engine-0.1.7 app/models/mail_engine/template_partial.rb
mail_engine-0.1.6 app/models/mail_engine/template_partial.rb
mail_engine-0.1.5 app/models/mail_engine/template_partial.rb
mail_engine-0.1.4 app/models/mail_engine/template_partial.rb
mail_engine-0.1.3 app/models/mail_engine/template_partial.rb