# File lib/page_asset_associations.rb, line 5 def self.included(base) base.class_eval { has_many :page_attachments, :order => "position ASC" has_many :assets, :through => :page_attachments, :order => "page_attachments.position ASC" accepts_nested_attributes_for :page_attachments, :allow_destroy => true } end