lib/alba/many.rb in alba-0.10.2 vs lib/alba/many.rb in alba-0.11.0

- old
+ new

@@ -3,10 +3,10 @@ module Alba # Representing many association class Many < Association def to_hash(target, params: {}) objects = target.public_send(@name) - objects = @condition.call(objects) if @condition + objects = @condition.call(objects, params) if @condition objects.map { |o| @resource.new(o, params: params).to_hash } end end end