mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
if it responds to :usec, it should also "act like" a time
This commit is contained in:
@@ -121,7 +121,7 @@ module ActiveRecord
|
||||
# Quote date/time values for use in SQL input. Includes microseconds
|
||||
# if the value is a Time responding to usec.
|
||||
def quoted_date(value) #:nodoc:
|
||||
if value.acts_like?(:time) && value.respond_to?(:usec)
|
||||
if value.respond_to?(:usec)
|
||||
"#{super}.#{sprintf("%06d", value.usec)}"
|
||||
else
|
||||
super
|
||||
|
||||
Reference in New Issue
Block a user