diff options
author | Xavier Noria <fxn@hashref.com> | 2014-10-28 17:33:36 -0700 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2014-10-28 17:47:32 -0700 |
commit | e595d91ac2c07371b441f8b04781e7c03ac44135 (patch) | |
tree | 6a532ad1cc4f8f9418ab748d3c116aecf208da44 /activerecord/lib/active_record/type/boolean.rb | |
parent | ec012e446ad5a502ce5fcf5139a3ed7ee9e220ba (diff) | |
download | rails-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 'activerecord/lib/active_record/type/boolean.rb')
-rw-r--r-- | activerecord/lib/active_record/type/boolean.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/type/boolean.rb b/activerecord/lib/active_record/type/boolean.rb index 612478e67d..978d16d524 100644 --- a/activerecord/lib/active_record/type/boolean.rb +++ b/activerecord/lib/active_record/type/boolean.rb @@ -14,9 +14,13 @@ module ActiveRecord true else if !ConnectionAdapters::Column::FALSE_VALUES.include?(value) - ActiveSupport::Deprecation.warn(<<-EOM) - You attempted to assign a value which is not explicitly true or false to a boolean column. Currently this value casts to false. This will change to match Ruby's semantics, and will cast to true in Rails 5.0. If you would like to maintain the current behavior, you should explicitly handle the values you would like cast to false. - EOM + ActiveSupport::Deprecation.warn(<<-MSG.squish) + You attempted to assign a value which is not explicitly `true` or `false` + to a boolean column. Currently this value casts to `false`. This will + change to match Ruby's semantics, and will cast to `true` in Rails 5. + If you would like to maintain the current behavior, you should + explicitly handle the values you would like cast to `false`. + MSG end false end |