universal_table/app/models/column_entry.rb

21 lines
407 B
Ruby
Raw 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
2022-02-25 06:49:00 +00:00
field :number, type: Integer
2015-11-13 13:10:00 +00:00
mount_uploader :image, ImageUploader
belongs_to :table_entry
belongs_to :table_column
def type
self.table_column.type
2022-02-25 06:49:00 +00:00
end
2015-11-13 13:10:00 +00:00
end