aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorEileen M. Uchitelle <eileencodes@gmail.com>2015-12-15 09:07:19 -0500
committerEileen M. Uchitelle <eileencodes@gmail.com>2015-12-15 09:07:19 -0500
commite73fe1dd8c2740ae29e7a7f48d71a62b46e6b49d (patch)
treee258c517061199c78dc18fd770a4a6d2a8e3bce4 /activerecord
parent7cd491796a2d6cc7102073344cbed8f94b8ed92c (diff)
parent08780eff79f93f5741dc80fb1fb1a091b9a9c94e (diff)
downloadrails-e73fe1dd8c2740ae29e7a7f48d71a62b46e6b49d.tar.gz
rails-e73fe1dd8c2740ae29e7a7f48d71a62b46e6b49d.tar.bz2
rails-e73fe1dd8c2740ae29e7a7f48d71a62b46e6b49d.zip
Merge pull request #22596 from y-yagi/remove_extra_space_from_deprecation_msg
remove extra spaces from deprecation message
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb4
-rw-r--r--activerecord/lib/active_record/relation/query_methods.rb3
2 files changed, 5 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb b/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb
index 9e693b6aee..45d2c855a5 100644
--- a/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb
+++ b/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb
@@ -1,3 +1,5 @@
+require 'active_support/core_ext/string/strip'
+
module ActiveRecord
module AttributeMethods
module TimeZoneConversion
@@ -77,7 +79,7 @@ module ActiveRecord
!result &&
cast_type.type == :time &&
time_zone_aware_types.include?(:not_explicitly_configured)
- ActiveSupport::Deprecation.warn(<<-MESSAGE)
+ ActiveSupport::Deprecation.warn(<<-MESSAGE.strip_heredoc)
Time columns will become time zone aware in Rails 5.1. This
still causes `String`s to be parsed as if they were in `Time.zone`,
and `Time`s to be converted to `Time.zone`.
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb
index 66f00c31e2..983bf019bc 100644
--- a/activerecord/lib/active_record/relation/query_methods.rb
+++ b/activerecord/lib/active_record/relation/query_methods.rb
@@ -3,6 +3,7 @@ require "active_record/relation/query_attribute"
require "active_record/relation/where_clause"
require "active_record/relation/where_clause_factory"
require 'active_model/forbidden_attributes_protection'
+require 'active_support/core_ext/string/filters'
module ActiveRecord
module QueryMethods
@@ -694,7 +695,7 @@ module ActiveRecord
def limit!(value) # :nodoc:
if string_containing_comma?(value)
# Remove `string_containing_comma?` when removing this deprecation
- ActiveSupport::Deprecation.warn(<<-WARNING)
+ ActiveSupport::Deprecation.warn(<<-WARNING.squish)
Passing a string to limit in the form "1,2" is deprecated and will be
removed in Rails 5.1. Please call `offset` explicitly instead.
WARNING