aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2010-05-11 15:39:29 +0100
committerPratik Naik <pratiknaik@gmail.com>2010-05-11 15:39:29 +0100
commit88b4a8fcafc7c52ad7deaa4fee9ee0fabf68940c (patch)
treebac24e3c5a6d0c5ac5eb4353518e813c176eb0ab /activerecord
parent475d1d1713faddee890e2367724a629169e079fe (diff)
downloadrails-88b4a8fcafc7c52ad7deaa4fee9ee0fabf68940c.tar.gz
rails-88b4a8fcafc7c52ad7deaa4fee9ee0fabf68940c.tar.bz2
rails-88b4a8fcafc7c52ad7deaa4fee9ee0fabf68940c.zip
Remove undocumented save_without_validation!
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/validations.rb4
-rw-r--r--activerecord/test/cases/validations_test.rb6
2 files changed, 0 insertions, 10 deletions
diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb
index 7a6fef0b7b..be64e00bd1 100644
--- a/activerecord/lib/active_record/validations.rb
+++ b/activerecord/lib/active_record/validations.rb
@@ -40,10 +40,6 @@ module ActiveRecord
perform_validations(options) ? super : false
end
- def save_without_validation!
- save!(:validate => false)
- end
-
# Attempts to save the record just like Base#save but will raise a RecordInvalid exception instead of returning false
# if the record is not valid.
def save!(options={})
diff --git a/activerecord/test/cases/validations_test.rb b/activerecord/test/cases/validations_test.rb
index b873babc36..3a34df2426 100644
--- a/activerecord/test/cases/validations_test.rb
+++ b/activerecord/test/cases/validations_test.rb
@@ -152,12 +152,6 @@ class ValidationsTest < ActiveRecord::TestCase
end
end
- def test_create_without_validation_bang
- count = WrongReply.count
- assert_nothing_raised { WrongReply.new.save_without_validation! }
- assert count+1, WrongReply.count
- end
-
def test_validates_acceptance_of_with_non_existant_table
Object.const_set :IncorporealModel, Class.new(ActiveRecord::Base)