Module: Irwi::Extensions::Models::WikiPage
- Defined in:
- lib/irwi/extensions/models/wiki_page.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/irwi/extensions/models/wiki_page.rb', line 33 def self.included( base ) base.send :extend, Irwi::Extensions::Models::WikiPage::ClassMethods base.send :include, Irwi::Extensions::Models::WikiPage::InstanceMethods base.send :attr_accessor, :comment, :previous_version_number base.belongs_to :creator, :class_name => Irwi.config.user_class_name base.belongs_to :updator, :class_name => Irwi.config.user_class_name base.has_many :versions, :class_name => Irwi.config.page_version_class_name, :foreign_key => Irwi.config.page_version_foreign_key, :order => 'id DESC' if Irwi::config. base.has_many :attachments, :class_name => Irwi.config., :foreign_key => Irwi.config.page_version_foreign_key end base.after_save :create_new_version end |