diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-12-05 02:17:52 -0800 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-12-05 02:17:52 -0800 |
commit | 4af9be089c345c58b6eae462226ca7190bc6bb73 (patch) | |
tree | ac6b4decd50097a5b634720b56f6396146574016 /activemodel/lib/active_model/errors.rb | |
parent | 129eac024382c7fbdad2007e86cf25778d5f6787 (diff) | |
parent | 019df9887519701b321c668c1d27d5c0c26fee7a (diff) | |
download | rails-4af9be089c345c58b6eae462226ca7190bc6bb73.tar.gz rails-4af9be089c345c58b6eae462226ca7190bc6bb73.tar.bz2 rails-4af9be089c345c58b6eae462226ca7190bc6bb73.zip |
Merge pull request #8421 from claudiob/remove_unicode_blanks
Replace comments' non-breaking spaces with spaces [ci skip]
Diffstat (limited to 'activemodel/lib/active_model/errors.rb')
-rw-r--r-- | activemodel/lib/active_model/errors.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb index c82d4f012c..963e52bff3 100644 --- a/activemodel/lib/active_model/errors.rb +++ b/activemodel/lib/active_model/errors.rb @@ -122,7 +122,7 @@ module ActiveModel # Delete messages for +key+. Returns the deleted messages. # # person.errors.get(:name) # => ["can not be nil"] - # person.errors.delete(:name) # => ["can not be nil"] + # person.errors.delete(:name) # => ["can not be nil"] # person.errors.get(:name) # => nil def delete(key) messages.delete(key) @@ -213,7 +213,7 @@ module ActiveModel # Returns +true+ if no errors are found, +false+ otherwise. # If the error message is a string it can be empty. # - # person.errors.full_messages # => ["name can not be nil"] + # person.errors.full_messages # => ["name can not be nil"] # person.errors.empty? # => false def empty? all? { |k, v| v && v.empty? && !v.is_a?(String) } @@ -246,7 +246,7 @@ module ActiveModel to_hash(options && options[:full_messages]) end - # Returns a Hash of attributes with their error messages. If +full_messages+ + # Returns a Hash of attributes with their error messages. If +full_messages+ # is +true+, it will contain full messages (see +full_message+). # # person.to_hash # => {:name=>["can not be nil"]} |