diff --git a/lib/active_model/serializer/adapter/json_api.rb b/lib/active_model/serializer/adapter/json_api.rb index 0d93cac5d..3f0057a8c 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