Changeset 718
- Timestamp:
- 02/01/08 18:48:46 (6 months ago)
- Files:
-
- branches/rails2/app/models/page.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/rails2/app/models/page.rb
r715 r718 11 11 acts_as_tree :order => 'virtual DESC, title ASC' 12 12 has_many :parts, :class_name => 'PagePart', :order => 'id', :dependent => :destroy 13 belongs_to : _layout, :class_name => 'Layout', :foreign_key => 'layout_id'13 belongs_to :layout 14 14 belongs_to :created_by, :class_name => 'User', :foreign_key => 'created_by' 15 15 belongs_to :updated_by, :class_name => 'User', :foreign_key => 'updated_by' … … 37 37 set_inheritance_column :class_name 38 38 39 def layout 40 unless _layout39 def layout_with_inheritance 40 unless layout_without_inheritance 41 41 parent.layout if parent? 42 42 else 43 _layout 44 end 45 end 43 layout_without_inheritance 44 end 45 end 46 alias_method_chain :layout, :inheritance 46 47 47 48 def cache?
