Skip to content

Instantly share code, notes, and snippets.

@bgentry
Created November 30, 2011 23:02
Show Gist options
  • Select an option

  • Save bgentry/1411668 to your computer and use it in GitHub Desktop.

Select an option

Save bgentry/1411668 to your computer and use it in GitHub Desktop.
updating the txid to txid_current() before all saves
class Domain < Sequel::Model
def before_save
model.dataset.filter(id: self.id).update(txid: :txid_current.sql_function)
super
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment