1
0
Fork 0
mirror of https://github.com/neocities/neocities.git synced 2025-05-11 01:08:30 +02:00
neocities/ext/sequel/plugins/create_timestamp.rb

8 lines
No EOL
197 B
Ruby

module Sequel::Plugins::CreateTimestamp
module InstanceMethods
def before_create
self.created_at = Time.now if respond_to?(:created_at) && !self.created_at
super
end
end
end