lib/mongoid/timestamps/updated.rb in mongoid-2.8.1 vs lib/mongoid/timestamps/updated.rb in mongoid-3.0.0.rc
- old
+ new
@@ -1,15 +1,15 @@
# encoding: utf-8
-module Mongoid #:nodoc:
+module Mongoid
module Timestamps
# This module handles the behaviour for setting up document updated at
# timestamp.
module Updated
extend ActiveSupport::Concern
included do
- field :updated_at, :type => Time
- set_callback :save, :before, :set_updated_at, :if => :able_to_set_updated_at?
+ field :updated_at, type: Time
+ set_callback :save, :before, :set_updated_at, if: :able_to_set_updated_at?
end
# Update the updated_at field on the Document to the current time.
# This is only called on create and on save.
#