Orbit/app/models/meta/meta.rb

19 lines
282 B
Ruby
Raw Normal View History

class Meta
include Mongoid::Document
include Mongoid::Timestamps
field :key
field :title, localize: true
field :value, :default => nil
2012-05-06 16:54:18 +00:00
def get_name_content
[self.key, get_content]
end
def get_content
self.value ? self.value : self.title
2012-05-06 16:54:18 +00:00
end
end