engine/app/models/editable_element.rb

24 lines
514 B
Ruby
Raw Normal View History

class EditableElement
2011-08-17 20:32:39 +00:00
include Mongoid::Document
include Mongoid::I18n
2011-08-17 20:32:39 +00:00
## fields ##
field :slug
field :block
localized_field :default_content
field :default_attribute
field :hint
field :disabled, :type => Boolean, :default => false
field :assignable, :type => Boolean, :default => true
field :from_parent, :type => Boolean, :default => false
2011-08-17 20:32:39 +00:00
## associations ##
embedded_in :page, :inverse_of => :editable_elements
2011-08-17 20:32:39 +00:00
## validations ##
validates_presence_of :slug
2011-08-17 20:32:39 +00:00
## methods ##
end