diff options
author | Xavier Noria <fxn@hashref.com> | 2014-10-28 16:46:19 -0700 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2014-10-28 16:46:19 -0700 |
commit | cd45306dbdf229ada6783c36cbd9cc18da26954a (patch) | |
tree | 704402cb6a6ddccc23321d202f0d79fd5a828788 /activerecord/lib/active_record/core.rb | |
parent | 21f081c0ca86df65c2598e3a273a4c9a785dd5d6 (diff) | |
parent | b3bfa361c503e107aff4dee5edf79bd7fd3d3725 (diff) | |
download | rails-cd45306dbdf229ada6783c36cbd9cc18da26954a.tar.gz rails-cd45306dbdf229ada6783c36cbd9cc18da26954a.tar.bz2 rails-cd45306dbdf229ada6783c36cbd9cc18da26954a.zip |
Merge pull request #17421 from rails/warn-with-heredoc
let warn with heredocs
Diffstat (limited to 'activerecord/lib/active_record/core.rb')
-rw-r--r-- | activerecord/lib/active_record/core.rb | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb index f9b6375459..9ab27bbac5 100644 --- a/activerecord/lib/active_record/core.rb +++ b/activerecord/lib/active_record/core.rb @@ -1,6 +1,7 @@ +require 'thread' require 'active_support/core_ext/hash/indifferent_access' require 'active_support/core_ext/object/duplicable' -require 'thread' +require 'active_support/core_ext/string/filters' module ActiveRecord module Core @@ -88,8 +89,10 @@ module ActiveRecord mattr_accessor :maintain_test_schema, instance_accessor: false def self.disable_implicit_join_references=(value) - ActiveSupport::Deprecation.warn("Implicit join references were removed with Rails 4.1." \ - "Make sure to remove this configuration because it does nothing.") + ActiveSupport::Deprecation.warn(<<-MSG.squish) + Implicit join references were removed with Rails 4.1. + Make sure to remove this configuration because it does nothing. + MSG end class_attribute :default_connection_handler, instance_writer: false @@ -135,8 +138,10 @@ module ActiveRecord id = ids.first if ActiveRecord::Base === id id = id.id - ActiveSupport::Deprecation.warn "You are passing an instance of ActiveRecord::Base to `find`." \ - "Please pass the id of the object by calling `.id`" + ActiveSupport::Deprecation.warn(<<-MSG.squish) + You are passing an instance of ActiveRecord::Base to `find`. + Please pass the id of the object by calling `.id` + MSG end key = primary_key |