aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2010-09-05 14:59:58 -0300
committerJosé Valim <jose.valim@gmail.com>2010-09-06 13:38:38 +0200
commita18b73b43c07d031c9a660bc119835dcb6db85cf (patch)
treeb403fbb684ada5d408d619257a566779896f71fc /activeresource/lib
parent7204bb0feb6f6a76243749eef2c67b8265a6bba7 (diff)
downloadrails-a18b73b43c07d031c9a660bc119835dcb6db85cf.tar.gz
rails-a18b73b43c07d031c9a660bc119835dcb6db85cf.tar.bz2
rails-a18b73b43c07d031c9a660bc119835dcb6db85cf.zip
Remove all deprecation warnings in activeresource
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activeresource/lib')
-rw-r--r--activeresource/lib/active_resource/validations.rb12
1 files changed, 2 insertions, 10 deletions
diff --git a/activeresource/lib/active_resource/validations.rb b/activeresource/lib/active_resource/validations.rb
index adceac2f61..d3b19ee560 100644
--- a/activeresource/lib/active_resource/validations.rb
+++ b/activeresource/lib/active_resource/validations.rb
@@ -68,16 +68,8 @@ module ActiveResource
# Validate a resource and save (POST) it to the remote web service.
# If any local validations fail - the save (POST) will not be attempted.
- def save_with_validation(options=nil)
- perform_validation = case options
- when Hash
- options[:validate] != false
- when NilClass
- true
- else
- ActiveSupport::Deprecation.warn "save(#{options}) is deprecated, please give save(:validate => #{options}) instead", caller
- options
- end
+ def save_with_validation(options={})
+ perform_validation = options[:validate] != false
# clear the remote validations so they don't interfere with the local
# ones. Otherwise we get an endless loop and can never change the