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