Sha256: 27423a452df52cae793b4430ba52612a509a1fbcca2b36c042a85f39fdedb3ff

Contents?: true

Size: 417 Bytes

Versions: 2

Compression:

Stored size: 417 Bytes

Contents

module Pulitzer
  class JustificationStyle < ActiveRecord::Base
    belongs_to :post_type_version
    has_many :partials
    validates :display_name, presence: true
    validates :css_class_name, presence: true

    def clone_me
      clone_attrs = self.attributes.dup
      clone_attrs.delete 'id'
      clone_attrs.delete 'post_type_version_id'
      Pulitzer::JustificationStyle.new(clone_attrs)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pulitzer-0.15.12 app/models/pulitzer/justification_style.rb
pulitzer-0.15.11 app/models/pulitzer/justification_style.rb