diff --git a/Gemfile.lock b/Gemfile.lock index 9872ae5..726ed3f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,7 +7,7 @@ GIT PATH remote: . specs: - api-blocks (0.8.0) + api-blocks (0.9.0) activesupport (>= 5.1.0) dry-configurable (~> 0.8) dry-monads (~> 1.3) @@ -101,10 +101,9 @@ GEM dry-equalizer (~> 0.2) dry-inflector (0.2.0) dry-initializer (3.0.4) - dry-logic (1.0.8) + dry-logic (1.1.0) concurrent-ruby (~> 1.0) - dry-core (~> 0.2) - dry-equalizer (~> 0.2) + dry-core (~> 0.5, >= 0.5) dry-matcher (0.8.3) dry-core (>= 0.4.8) dry-monads (1.3.5) diff --git a/lib/api_blocks/blueprinter/association_extractor.rb b/lib/api_blocks/blueprinter/association_extractor.rb index 2889624..ef52b15 100644 --- a/lib/api_blocks/blueprinter/association_extractor.rb +++ b/lib/api_blocks/blueprinter/association_extractor.rb @@ -54,6 +54,7 @@ def extract(association_name, object, local_options, options = {}) model.where(join_key.key => ids).merge(scope).each do |record| loader.call(record.send(join_key.key)) do |memo| memo << render_blueprint(record, local_options, options) + memo.uniq end end when ActiveRecord::Associations::HasOneAssociation diff --git a/lib/api_blocks/version.rb b/lib/api_blocks/version.rb index bbb2580..4d881f8 100644 --- a/lib/api_blocks/version.rb +++ b/lib/api_blocks/version.rb @@ -2,5 +2,5 @@ module ApiBlocks # Current version of ApiBlocks - VERSION = '0.8.0' + VERSION = '0.9.0' end