From 8b2a6014a2971159c2169704ee5d3402f8d8d1a3 Mon Sep 17 00:00:00 2001
From: Marcel Molina <marcel@vernix.org>
Date: Fri, 26 Oct 2007 03:20:14 +0000
Subject: Use VALID_FIND_OPTIONS when resolving :find scoping rather than hard
 coding the list of valid find options. Closes #9443 [sur]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8025 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
---
 activerecord/CHANGELOG                 | 2 ++
 activerecord/lib/active_record/base.rb | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG
index 30ee1cec0b..77f882f143 100644
--- a/activerecord/CHANGELOG
+++ b/activerecord/CHANGELOG
@@ -1,5 +1,7 @@
 *SVN*
 
+* Use VALID_FIND_OPTIONS when resolving :find scoping rather than hard coding the list of valid find options. Closes #9443 [sur]
+
 * Limited eager loading no longer ignores scoped :order. Closes #9561 [danger, josh]
 
 * Assigning an instance of a foreign class to a composed_of aggregate calls an optional conversion block. Refactor and simplify composed_of implementation.  #6322 [brandon, Chris Cruft]
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 47bc8bdb2c..48517d2ca8 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -1428,7 +1428,7 @@ module ActiveRecord #:nodoc:
           method_scoping.assert_valid_keys([ :find, :create ])
 
           if f = method_scoping[:find]
-            f.assert_valid_keys([ :conditions, :joins, :select, :include, :from, :offset, :limit, :order, :group, :readonly, :lock ])
+            f.assert_valid_keys(VALID_FIND_OPTIONS)
             set_readonly_option! f
           end
 
-- 
cgit v1.2.3