sql
sql copied to clipboard
Add argless `#update` and `#delete` instance query shortcuts
repo.exec(user.update(updated_at: Time.now))
Doesn't work now, as Model#update requires Changeset argument.
I think that it would be better to add argless update and delete shortcuts:
user.update == User.where(id: user.id!).update
The first example would be changed to:
repo.exec(user.update.set(updated_at: Time.now))