Module: MrEko::Core
Defined Under Namespace
Modules: GlobalHelpers
Class Method Summary collapse
Instance Method Summary collapse
-
#before_create ⇒ Object
The Sequel timestamps plugin doesn’t seem to work, so…
- #before_update ⇒ Object
Class Method Details
.included(base) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/mr_eko/core.rb', line 4 def self.included(base) base.send(:include, GlobalHelpers) base.extend GlobalHelpers # The Sequel timestamps plugin doesn't seem to work, so... def before_create; self.created_on = Time.now.utc; end def before_update; self.updated_on = Time.now.utc; end end |
Instance Method Details
#before_create ⇒ Object
The Sequel timestamps plugin doesn’t seem to work, so…
9 |
# File 'lib/mr_eko/core.rb', line 9 def before_create; self.created_on = Time.now.utc; end |
#before_update ⇒ Object
10 |
# File 'lib/mr_eko/core.rb', line 10 def before_update; self.updated_on = Time.now.utc; end |