mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-24 23:06:50 +00:00
Restore order of fields in hash to original order.
This commit is contained in:
parent
e470b09c6e
commit
b4616d737c
@ -12,7 +12,7 @@ class ArraySerializerTest < ActiveModel::TestCase
|
|||||||
serializer = array.active_model_serializer.new(array, :scope => {:scope => true})
|
serializer = array.active_model_serializer.new(array, :scope => {:scope => true})
|
||||||
assert_equal([
|
assert_equal([
|
||||||
{ :model => "Model" },
|
{ :model => "Model" },
|
||||||
{ :first_name => "Jose", :last_name => "Valim", :ok => true, :scope => true },
|
{ :last_name => "Valim", :ok => true, :first_name => "Jose", :scope => true },
|
||||||
{ :title => "Comment1" }
|
{ :title => "Comment1" }
|
||||||
], serializer.as_json)
|
], serializer.as_json)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user