From f9b7c742359092e12447906af3d3800c43d0102e Mon Sep 17 00:00:00 2001 From: Edgars Jekabsons Date: Wed, 22 Oct 2014 15:30:44 +0300 Subject: [PATCH] Renamed embed test to have "test" suffix Fixed reference to association options --- lib/active_model/serializer/adapter/json_api.rb | 2 +- .../{has_many_embed_ids.rb => has_many_embed_ids_test.rb} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename test/adapter/json_api/{has_many_embed_ids.rb => has_many_embed_ids_test.rb} (100%) diff --git a/lib/active_model/serializer/adapter/json_api.rb b/lib/active_model/serializer/adapter/json_api.rb index 71327b3c8..34ca48a53 100644 --- a/lib/active_model/serializer/adapter/json_api.rb +++ b/lib/active_model/serializer/adapter/json_api.rb @@ -18,7 +18,7 @@ def serializable_hash(options = {}) serializer.each_association do |name, association, opts| @hash[@root][:links] ||= {} - unless options[:embed] == :ids + unless opts[:embed] == :ids @hash[:linked] ||= {} end diff --git a/test/adapter/json_api/has_many_embed_ids.rb b/test/adapter/json_api/has_many_embed_ids_test.rb similarity index 100% rename from test/adapter/json_api/has_many_embed_ids.rb rename to test/adapter/json_api/has_many_embed_ids_test.rb