Module: Sequel::Plugins::Timestamps::InstanceMethods
- Defined in:
- lib/cortex_reaver/support/timestamps.rb
Instance Method Summary collapse
-
#before_create ⇒ Object
Create.
-
#before_update ⇒ Object
Update.
- #skip_timestamp_update=(boolean) ⇒ Object
- #skip_timestamp_update? ⇒ Boolean
Instance Method Details
#before_create ⇒ Object
Create
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/cortex_reaver/support/timestamps.rb', line 7 def before_create return false if super == false unless self.created_on = Time.now self.updated_on = Time.now end true end |
#before_update ⇒ Object
Update
19 20 21 22 23 24 25 26 27 |
# File 'lib/cortex_reaver/support/timestamps.rb', line 19 def before_update return false if super == false unless self.updated_on = Time.now end true end |
#skip_timestamp_update=(boolean) ⇒ Object
29 30 31 |
# File 'lib/cortex_reaver/support/timestamps.rb', line 29 def (boolean) @skip_timestamp_update = boolean end |
#skip_timestamp_update? ⇒ Boolean
33 34 35 |
# File 'lib/cortex_reaver/support/timestamps.rb', line 33 def @skip_timestamp_update end |