universal_table/app/models/column_entry.rb

20 lines
378 B
Ruby
Raw Permalink Normal View History

2015-11-13 13:10:00 +00:00
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