Created
November 30, 2011 23:02
-
-
Save bgentry/1411668 to your computer and use it in GitHub Desktop.
updating the txid to txid_current() before all saves
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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