curation/app/models/curation_post_section.rb

19 lines
365 B
Ruby

# encoding: utf-8
class CurationPostSection
include Mongoid::Document
include Mongoid::Timestamps
field :title, localize: true
field :section_type
field :text, localize: true
field :universal_table
field :table_entries
belongs_to :curation_post
def get_table_entries
tids = self.table_entries.split(',')
TableEntry.find(tids)
end
end