Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If it use active hash with web api responses, `as_json` behavior is different between active hash's instance and active model's instance. ``` 1) ActiveHash Base #as_json returns a hash Failure/Error: expect(country.as_json).to eq({"id" => 1, "name" => "US", "language" => "English"}) expected: {"id"=>1, "name"=>"US", "language"=>"English"} got: {"attributes"=>{"id"=>1, "name"=>"US", "language"=>"English"}} ``` We don't need `attributes` route key. If it includes `ActiveModel::Serializers::JSON`, behavior of active hash's instance would be as same as a behavior active model's instance. Thanks :)
- Loading branch information