Sha256: b6b5f2a6386766c15d79d733306d3a487c03d1461d94fc04db14b331cc2baa62
Contents?: true
Size: 839 Bytes
Versions: 12
Compression:
Stored size: 839 Bytes
Contents
module Pageflow class Account < ActiveRecord::Base include FeatureTarget has_many :entries, dependent: :restrict_with_exception has_many :folders, dependent: :destroy has_many :memberships, as: :entity, dependent: :restrict_with_exception has_many :users, through: :memberships, source: :user, class_name: '::User' has_many :entry_memberships, through: :entries, source: :memberships has_many :themings, dependent: :destroy 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