registered-sites/app/models/site_log.rb

14 lines
376 B
Ruby
Raw Normal View History

class SiteLog
include Mongoid::Document
include Mongoid::Timestamps
field :title
field :content
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