2010-07-23 20:09:54 +00:00
|
|
|
module Locomotive
|
|
|
|
module Liquid
|
|
|
|
module Drops
|
2010-05-30 23:57:33 +00:00
|
|
|
class Content < Base
|
2011-06-23 12:57:52 +00:00
|
|
|
delegate :seo_title, :meta_keywords, :meta_description, :to => '_source'
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2011-06-03 00:25:19 +00:00
|
|
|
def _id
|
2011-06-21 00:39:59 +00:00
|
|
|
self._source._id.to_s
|
2011-06-03 00:25:19 +00:00
|
|
|
end
|
|
|
|
|
2010-05-30 23:57:33 +00:00
|
|
|
def before_method(meth)
|
2011-06-21 00:39:59 +00:00
|
|
|
return '' if self._source.nil?
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2010-05-30 23:57:33 +00:00
|
|
|
if not @@forbidden_attributes.include?(meth.to_s)
|
2011-06-21 00:39:59 +00:00
|
|
|
value = self._source.send(meth)
|
2010-05-30 23:57:33 +00:00
|
|
|
end
|
|
|
|
end
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2010-07-16 20:36:07 +00:00
|
|
|
def highlighted_field_value
|
2011-06-21 00:39:59 +00:00
|
|
|
self._source.highlighted_field_value
|
2010-07-16 20:36:07 +00:00
|
|
|
end
|
2010-07-23 20:09:54 +00:00
|
|
|
|
|
|
|
end
|
2010-05-30 23:57:33 +00:00
|
|
|
end
|
2010-07-23 20:09:54 +00:00
|
|
|
end
|
|
|
|
end
|