Sha256: 6732cc5cbd8af943d5384df4e0938345c8be7db533c49d81be56375d4b994820

Contents?: true

Size: 524 Bytes

Versions: 12

Compression:

Stored size: 524 Bytes

Contents

module Pageflow
  class Account < ActiveRecord::Base
    has_many :users
    has_many :entries
    has_many :folders

    has_many :themings
    belongs_to :default_theming, :class_name => 'Theming'

    validates :default_theming, :presence => true

    accepts_nested_attributes_for :default_theming, :update_only => true

    scope :with_landing_page, -> { where.not(:landing_page_name => '') }

    def build_default_theming(*args)
      super.tap do |theming|
        theming.account = self
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pageflow-0.8.2 app/models/pageflow/account.rb
pageflow-0.8.1 app/models/pageflow/account.rb
pageflow-0.8.0 app/models/pageflow/account.rb
pageflow-0.7.2 app/models/pageflow/account.rb
pageflow-0.7.1 app/models/pageflow/account.rb
pageflow-0.7.0 app/models/pageflow/account.rb
pageflow-0.6.0 app/models/pageflow/account.rb
pageflow-0.5.0 app/models/pageflow/account.rb
pageflow-0.4.0 app/models/pageflow/account.rb
pageflow-0.3.0 app/models/pageflow/account.rb
pageflow-0.2.1 app/models/pageflow/account.rb
pageflow-0.2.0 app/models/pageflow/account.rb