app/api/locomotive/api/entities/content_entry_entity.rb in locomotivecms-3.2.1 vs app/api/locomotive/api/entities/content_entry_entity.rb in locomotivecms-3.3.0.rc1
- old
+ new
@@ -69,9 +69,13 @@
def expose_many_to_many_field(name)
dynamic_value_of(name).pluck_with_natural_order(:_slug)
end
+ def expose_json_field(name)
+ expose_default_field(name).try(:to_json)
+ end
+
def dynamic_value_of(name)
self.object.send(name)
end
def content_type