diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-05-15 13:38:29 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-05-15 13:38:29 -0300 |
commit | 9b4f5041d29f7e558f3286d40e5dc9edbe96cfb6 (patch) | |
tree | f5966abb8212eca449bcb826f067cd5736f66675 | |
parent | 2649fba09d67094bb858b58b37a69c74e443514a (diff) | |
download | rails-9b4f5041d29f7e558f3286d40e5dc9edbe96cfb6.tar.gz rails-9b4f5041d29f7e558f3286d40e5dc9edbe96cfb6.tar.bz2 rails-9b4f5041d29f7e558f3286d40e5dc9edbe96cfb6.zip |
Kill whitespaces :scissors:
-rw-r--r-- | activemodel/lib/active_model/validations.rb | 4 | ||||
-rw-r--r-- | activemodel/test/cases/validations_test.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/activemodel/lib/active_model/validations.rb b/activemodel/lib/active_model/validations.rb index 72176e9bdd..611e9ffd55 100644 --- a/activemodel/lib/active_model/validations.rb +++ b/activemodel/lib/active_model/validations.rb @@ -177,12 +177,12 @@ module ActiveModel super end end - + # Clean the +Errors+ object if instance is duped def initialize_dup(other) # :nodoc: @errors = nil super - end + end # Returns the +Errors+ object that holds all information about attribute error messages. def errors diff --git a/activemodel/test/cases/validations_test.rb b/activemodel/test/cases/validations_test.rb index f9bb877316..1f5023bf76 100644 --- a/activemodel/test/cases/validations_test.rb +++ b/activemodel/test/cases/validations_test.rb @@ -344,7 +344,7 @@ class ValidationsTest < ActiveModel::TestCase Topic.validates :title, options assert_equal({ :presence => true }, options) end - + def test_dup_validity_is_independent Topic.validates_presence_of :title topic = Topic.new("title" => "Litterature") |