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

- old
+ new

@@ -3,10 +3,10 @@ module Alba # Representing one association class One < Association def to_hash(target, params: {}) object = target.public_send(@name) - object = @condition.call(object) if @condition + object = @condition.call(object, params) if @condition @resource.new(object, params: params).to_hash end end end