universal_table/app/models/column_entry.rb

20 lines
378 B
Ruby

class ColumnEntry
include Mongoid::Document
include Mongoid::Timestamps
field :text, :localize => true
field :content, :localize => true
field :date, type: DateTime
field :period_from, type: DateTime
field :period_to, type: DateTime
mount_uploader :image, ImageUploader
belongs_to :table_entry
belongs_to :table_column
def type
self.table_column.type
end
end