orbit-4-2/app/models/asset_category.rb

15 lines
238 B
Ruby

class AssetCategory
include Mongoid::Document
include Mongoid::Timestamps
field :key
field :display
field :title, localize: true
has_many :assets
def self.from_id(id)
AssetCategory.find(id) rescue nil
end
end