orbit-basic/vendor/built_in_modules/web_resource/app/models/web_link_category.rb

23 lines
512 B
Ruby
Raw Normal View History

2012-02-15 07:38:27 +00:00
# encoding: utf-8
class WebLinkCategory
include Mongoid::Document
include Mongoid::Timestamps
include OrbitCoreLib::ObjectAuthable
2012-02-15 07:38:27 +00:00
# include Mongoid::MultiParameterAttributes
AfterObjectAuthUrl = '/panel/page_content/back_end/page_contexts'
APP_NAME = 'web_resource'
ObjectAuthTitlesOptions = %W{edit}
2012-02-15 07:38:27 +00:00
field :key
has_one :i18n_variable, :as => :language_value, :autosave => true, :dependent => :destroy
has_many :web_links
def pp_object
i18n_variable[I18n.locale]
end
2012-02-15 07:38:27 +00:00
end