registered-sites/app/models/site_log.rb

15 lines
425 B
Ruby
Raw Normal View History

class SiteLog
include Mongoid::Document
include Mongoid::Timestamps
field :title
field :content
2014-12-05 10:08:10 +00:00
field :archive, type: Boolean, default: false
field :create_user_id, type: BSON::ObjectId
field :update_user_id, type: BSON::ObjectId
belongs_to :registered_site
has_many :site_log_files, autosave: true, dependent: :destroy
accepts_nested_attributes_for :site_log_files, :allow_destroy => true
end