aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-09-15 07:02:05 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-09-15 07:02:05 +0000
commit3f1acf49bd4cfa902388f000ca96c848c3666017 (patch)
treeaf197c1f4ea786e76da1f0679225572ea1953a58 /activerecord/lib/active_record/base.rb
parentd0c000ab9e90be4896744cb6ec107dffa573f2dd (diff)
downloadrails-3f1acf49bd4cfa902388f000ca96c848c3666017.tar.gz
rails-3f1acf49bd4cfa902388f000ca96c848c3666017.tar.bz2
rails-3f1acf49bd4cfa902388f000ca96c848c3666017.zip
Deprecation tests. Remove warnings for dynamic finders and for the foo_count ethod if it's also an attribute.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5116 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rwxr-xr-xactiverecord/lib/active_record/base.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index e9c9212560..43f631ef6c 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -1198,7 +1198,7 @@ module ActiveRecord #:nodoc:
when nil
options = { :conditions => conditions }
set_readonly_option!(options)
- send(finder, options)
+ ActiveSupport::Deprecation.silence { send(finder, options) }
when Hash
finder_options = extra_options.merge(:conditions => conditions)
@@ -1207,14 +1207,16 @@ module ActiveRecord #:nodoc:
if extra_options[:conditions]
with_scope(:find => { :conditions => extra_options[:conditions] }) do
- send(finder, finder_options)
+ ActiveSupport::Deprecation.silence { send(finder, finder_options) }
end
else
- send(finder, finder_options)
+ ActiveSupport::Deprecation.silence { send(finder, finder_options) }
end
else
- send(deprecated_finder, conditions, *arguments[attribute_names.length..-1]) # deprecated API
+ ActiveSupport::Deprecation.silence do
+ send(deprecated_finder, conditions, *arguments[attribute_names.length..-1])
+ end
end
elsif match = /find_or_(initialize|create)_by_([_a-zA-Z]\w*)/.match(method_id.to_s)
instantiator = determine_instantiator(match)