Skip to content

Commit

Permalink
Set updated_at during update
Browse files Browse the repository at this point in the history
  • Loading branch information
hfjallemark authored and paulcsmith committed Jul 2, 2018
1 parent ff9dde9 commit f2538a6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lucky_record/form.cr
Expand Up @@ -333,6 +333,7 @@ abstract class LuckyRecord::Form(T)
end

private def update(id) : T
self.updated_at.value = Time.utc_now
@record = LuckyRecord::Repo.run do |db|
db.query update_query(id).statement_for_update(changes), update_query(id).args_for_update(changes) do |rs|
@record = @@schema_class.from_rs(rs).first
Expand Down

0 comments on commit f2538a6

Please sign in to comment.