active_model_serializers/lib/active_model/serializer/adapter/simple_adapter.rb
Tema Bolshakov f00fe5595d * Rename NullAdapter to SimpleAdapter
* Introduce abstract Adapter class
* Organaze test structure to match convemtions
2014-08-27 08:21:08 +04:00

14 lines
328 B
Ruby

module ActiveModel
class Serializer
class Adapter
class SimpleAdapter < Adapter
def to_json(options={})
@attributes.each_with_object({}) do |(attr, value), h|
h[attr] = value
end.to_json # FIXME: why does passing options here cause {}?
end
end
end
end
end