This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
2012-03-21 10:30:12 +00:00
|
|
|
class Meta
|
|
|
|
|
|
|
|
include Mongoid::Document
|
|
|
|
include Mongoid::Timestamps
|
|
|
|
|
|
|
|
field :key
|
2012-07-25 21:07:32 +00:00
|
|
|
field :title, localize: true
|
2012-03-21 10:30:12 +00:00
|
|
|
field :value, :default => nil
|
|
|
|
|
2012-05-06 16:54:18 +00:00
|
|
|
def get_name_content
|
|
|
|
[self.key, get_content]
|
|
|
|
end
|
|
|
|
|
|
|
|
def get_content
|
2012-07-25 21:07:32 +00:00
|
|
|
self.value ? self.value : self.title
|
2012-05-06 16:54:18 +00:00
|
|
|
end
|
2012-03-21 10:30:12 +00:00
|
|
|
|
|
|
|
end
|