aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-10-22 13:31:44 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-10-22 13:31:44 -0700
commit1ce76db9186a0b4ada341369f682bb8a0cd8da3b (patch)
treead38941f93b1b2bfd963d820582902bc2343e61b /activerecord
parent40491b465423879d23e979b91a13f06a2eec6522 (diff)
downloadrails-1ce76db9186a0b4ada341369f682bb8a0cd8da3b.tar.gz
rails-1ce76db9186a0b4ada341369f682bb8a0cd8da3b.tar.bz2
rails-1ce76db9186a0b4ada341369f682bb8a0cd8da3b.zip
if it responds to :usec, it should also "act like" a time
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
index c0cc7ba20d..69bf2c0dcd 100644
--- a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
@@ -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