aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2014-10-28 17:33:36 -0700
committerXavier Noria <fxn@hashref.com>2014-10-28 17:47:32 -0700
commite595d91ac2c07371b441f8b04781e7c03ac44135 (patch)
tree6a532ad1cc4f8f9418ab748d3c116aecf208da44 /activemodel
parentec012e446ad5a502ce5fcf5139a3ed7ee9e220ba (diff)
downloadrails-e595d91ac2c07371b441f8b04781e7c03ac44135.tar.gz
rails-e595d91ac2c07371b441f8b04781e7c03ac44135.tar.bz2
rails-e595d91ac2c07371b441f8b04781e7c03ac44135.zip
edit pass over all warnings
This patch uniformizes warning messages. I used the most common style already present in the code base: * Capitalize the first word. * End the message with a full stop. * "Rails 5" instead of "Rails 5.0". * Backticks for method names and inline code. Also, converted a few long strings into the new heredoc convention.
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/lib/active_model/dirty.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/dirty.rb b/activemodel/lib/active_model/dirty.rb
index ca04f48c1c..ae185694ca 100644
--- a/activemodel/lib/active_model/dirty.rb
+++ b/activemodel/lib/active_model/dirty.rb
@@ -1,5 +1,6 @@
require 'active_support/hash_with_indifferent_access'
require 'active_support/core_ext/object/duplicable'
+require 'active_support/core_ext/string/filters'
module ActiveModel
# == Active \Model \Dirty
@@ -200,7 +201,11 @@ module ActiveModel
end
def reset_changes
- ActiveSupport::Deprecation.warn "#reset_changes is deprecated and will be removed on Rails 5. Please use #clear_changes_information instead."
+ ActiveSupport::Deprecation.warn(<<-MSG.squish)
+ `#reset_changes` is deprecated and will be removed on Rails 5.
+ Please use `#clear_changes_information` instead.
+ MSG
+
clear_changes_information
end
@@ -224,7 +229,10 @@ module ActiveModel
# Handle <tt>reset_*!</tt> for +method_missing+.
def reset_attribute!(attr)
- ActiveSupport::Deprecation.warn "#reset_#{attr}! is deprecated and will be removed on Rails 5. Please use #restore_#{attr}! instead."
+ ActiveSupport::Deprecation.warn(<<-MSG.squish)
+ `#reset_#{attr}!` is deprecated and will be removed on Rails 5.
+ Please use `#restore_#{attr}!` instead.
+ MSG
restore_attribute!(attr)
end