lib/dm-serializer/to_json.rb in dm-serializer-0.10.1 vs lib/dm-serializer/to_json.rb in dm-serializer-0.10.2

- old
+ new

@@ -13,16 +13,16 @@ result = {} propset = properties_to_serialize(options) propset.each do |property| - result[property.name] = send(property.name) + result[property.name] = __send__(property.name) end # add methods (options[:methods] || []).each do |meth| if self.respond_to?(meth) - result[meth] = send(meth) + result[meth] = __send__(meth) end end # Note: if you want to include a whole other model via relation, use :methods # comments.to_json(:relationships=>{:user=>{:include=>[:first_name],:methods=>[:age]}})