Orbit/app/models/asset_category.rb

16 lines
302 B
Ruby
Raw Normal View History

2012-05-16 03:07:11 +00:00
class AssetCategory
include Mongoid::Document
include Mongoid::Timestamps
field :key
field :display
has_one :i18n_variable, :as => :language_value, :autosave => true, :dependent => :destroy
has_many :assets
def self.from_id(id)
AssetCategory.find(id) rescue nil
end
end