update query with where clause
Check if this works with your DBMS and DB adapter:
Model.where(conditions).limit(1).update_all(changes) # => 1
Update:
The limit()
and update_all()
combo is an example in the docs, so it's probably supported by most DB adapters.