Skip to content

Commit

Permalink
Fix: ArgumentError: wrong number of arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
khiav223577 committed Aug 19, 2023
1 parent 9c3271a commit 3243807
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/atomically/query_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ def update_all(expected_size, *args)
where_all_can_be_updated(@relation, expected_size).update_all(*args)
end

def update(attrs, from: :not_set)
def update(attrs, options = {})
from = options[:from] || :not_set
success = update_and_return_number_of_updated_rows(attrs, from) == 1

if success
Expand Down

0 comments on commit 3243807

Please sign in to comment.