aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/modules_test.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-04-27 11:42:22 +0100
committerJon Leighton <j@jonathanleighton.com>2012-04-27 11:42:50 +0100
commitdf6f971e3aedf8bb1ec318de95d7ce849e2c9c9e (patch)
treec18946036ddff7f38c92a9c4f8bff99bc6da49c9 /activerecord/test/cases/modules_test.rb
parenta57b7842d0fcdcbcc567532d3a5c1f2628057a0d (diff)
downloadrails-df6f971e3aedf8bb1ec318de95d7ce849e2c9c9e.tar.gz
rails-df6f971e3aedf8bb1ec318de95d7ce849e2c9c9e.tar.bz2
rails-df6f971e3aedf8bb1ec318de95d7ce849e2c9c9e.zip
%s/find(:\(first\|last\|all\), \([^()]*\))/scoped(\2).\1/gcI amongst other things
Diffstat (limited to 'activerecord/test/cases/modules_test.rb')
-rw-r--r--activerecord/test/cases/modules_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/modules_test.rb b/activerecord/test/cases/modules_test.rb
index aee8a42e91..76fc975a27 100644
--- a/activerecord/test/cases/modules_test.rb
+++ b/activerecord/test/cases/modules_test.rb
@@ -39,7 +39,7 @@ class ModulesTest < ActiveRecord::TestCase
end
def test_associations_spanning_cross_modules
- account = MyApplication::Billing::Account.find(:first, :order => 'id')
+ account = MyApplication::Billing::Account.scoped(:order => 'id').first
assert_kind_of MyApplication::Business::Firm, account.firm
assert_kind_of MyApplication::Billing::Firm, account.qualified_billing_firm
assert_kind_of MyApplication::Billing::Firm, account.unqualified_billing_firm