aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2015-03-03 22:28:03 +0900
committerRyuta Kamizono <kamipo@gmail.com>2015-05-03 21:54:27 +0900
commite61c32cb38dc3853a66ecb87550ba97be634c442 (patch)
tree9d43cdb774727b4292785264dc4155baa4384706 /activerecord/lib/active_record
parent5f844211bebc7a974dc3ff6d67901515369c1840 (diff)
downloadrails-e61c32cb38dc3853a66ecb87550ba97be634c442.tar.gz
rails-e61c32cb38dc3853a66ecb87550ba97be634c442.tar.bz2
rails-e61c32cb38dc3853a66ecb87550ba97be634c442.zip
Move comment about microseconds [ci skip]
The microseconds handling was already moved to `Quoting#quoted_date`.
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/quoting.rb2
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb3
2 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
index 91c7298983..2c7409b2dc 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
@@ -123,6 +123,8 @@ module ActiveRecord
'f'
end
+ # Quote date/time values for use in SQL input. Includes microseconds
+ # if the value is a Time responding to usec.
def quoted_date(value)
if value.acts_like?(:time)
zone_conversion_method = ActiveRecord::Base.default_timezone == :utc ? :getutc : :getlocal
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb b/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
index b7755c4593..f175730551 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
@@ -40,8 +40,7 @@ module ActiveRecord
PGconn.quote_ident(name.to_s)
end
- # Quote date/time values for use in SQL input. Includes microseconds
- # if the value is a Time responding to usec.
+ # Quote date/time values for use in SQL input.
def quoted_date(value) #:nodoc:
if value.year <= 0
bce_year = format("%04d", -value.year + 1)