Sha256: a6e00fc5b628b29f22bc7ea3f6ab7417ab6adf45f9f248d5a44fa74322d3d02e
Contents?: true
Size: 730 Bytes
Versions: 17
Compression:
Stored size: 730 Bytes
Contents
class DocumentedItem < ActiveRecord::Base attr_protected :created_at, :updated_at belongs_to :online_document_section def content if content? Content.find(documented_content_id) elsif klass? self.documented_klass end end def published_content(active_publication) if content? DocumentedContent.find_published_by_section(active_publication, online_document_section) elsif klass? self.documented_klass end end def klass? !!self.documented_klass end def content? !!self.documented_content_id end def self.find_by_section_id( website_section_id ) DocumentedItem.where(["online_document_section_id = ?", website_section_id]).first end end
Version data entries
17 entries across 17 versions & 1 rubygems