Sha256: 5a6deb7f90de6d278857360ba9938cdefb833907e8a5dc8f0f09812084667107

Contents?: true

Size: 458 Bytes

Versions: 29

Compression:

Stored size: 458 Bytes

Contents

module Cms
  module PageAssociationMethods
    def root
      first :conditions => {:root => true}
    end
  end

  module ContextAssociation
    def ContextAssociation.extended(other)
      other.has_many :pages, :class_name => 'Cms::Page', :dependent => :destroy, :foreign_key => :context_id, :extend => PageAssociationMethods
      other.has_many :assets, :class_name => 'Cms::Asset', :dependent => :destroy, :foreign_key => :context_id
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
liquid_cms-0.3.2.0 lib/liquid_cms/context_association.rb
liquid_cms-0.2.2.0 lib/liquid_cms/context_association.rb
liquid_cms-0.2.1.1 lib/liquid_cms/context_association.rb
liquid_cms-0.3.1.0 lib/liquid_cms/context_association.rb
liquid_cms-0.2.1.0 lib/liquid_cms/context_association.rb
liquid_cms-0.2.0.13 lib/liquid_cms/context_association.rb
liquid_cms-0.3.0.10 lib/liquid_cms/context_association.rb
liquid_cms-0.3.0.9 lib/liquid_cms/context_association.rb
liquid_cms-0.2.0.12 lib/liquid_cms/context_association.rb
liquid_cms-0.2.0.11 lib/liquid_cms/context_association.rb
liquid_cms-0.2.0.10 lib/liquid_cms/context_association.rb
liquid_cms-0.3.0.8 lib/liquid_cms/context_association.rb
liquid_cms-0.2.0.9 lib/liquid_cms/context_association.rb
liquid_cms-0.3.0.7 lib/liquid_cms/context_association.rb
liquid_cms-0.3.0.6 lib/liquid_cms/context_association.rb
liquid_cms-0.2.0.8 lib/liquid_cms/context_association.rb
liquid_cms-0.3.0.5 lib/liquid_cms/context_association.rb
liquid_cms-0.2.0.7 lib/liquid_cms/context_association.rb
liquid_cms-0.3.0.4 lib/liquid_cms/context_association.rb
liquid_cms-0.2.0.6 lib/liquid_cms/context_association.rb