From 88b4a8fcafc7c52ad7deaa4fee9ee0fabf68940c Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Tue, 11 May 2010 15:39:29 +0100 Subject: Remove undocumented save_without_validation! --- activerecord/lib/active_record/validations.rb | 4 ---- activerecord/test/cases/validations_test.rb | 6 ------ 2 files changed, 10 deletions(-) (limited to 'activerecord') 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) -- cgit v1.2.3