Orbit/vendor/built_in_modules/page_content/app/models/page_context.rb

24 lines
541 B
Ruby
Raw Normal View History

2012-02-21 11:22:42 +00:00
# encoding: utf-8
class PageContext
include Mongoid::Document
include Mongoid::Timestamps
include Mongoid::MultiParameterAttributes
has_one :context, :class_name => "I18nVariable", :as => :language_value, :autosave => true, :dependent => :destroy
field :create_user_id
field :update_user_id
2012-02-23 07:13:36 +00:00
field :version, :type => Integer , :default => 0
2012-02-21 11:22:42 +00:00
2012-02-23 07:13:36 +00:00
field :archived, :type => Boolean, :default => false
# field :current, :type => Boolean, :default => false
2012-02-21 11:22:42 +00:00
belongs_to :page
def is_top?
self.is_top
end
end