better_ar 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/better_ar/finder_methods.rb +2 -2
- data/lib/better_ar/version.rb +1 -1
- data/test/test_finder_methods.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0abd9c4a43817436d719c13997751ca837f7da7
|
4
|
+
data.tar.gz: 72f4114a37ef358ab72308ff1e88235527273df6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4393b539e0f57df2987caa04c9bdfc55501dcc5362e48fcd942f3f91254d4301152a0dfb16bdcf1db842e9c79f8ad131f382e3119a98adff4d20839ba833673
|
7
|
+
data.tar.gz: 97695baa4aec0c7cd02b19061b217811526b5d5b7bfda2c2e4c6602bb3f0429caa3110c2d9982016b8889ca857340ebe4b688ca07c70843639fc4cdc1ab90151
|
@@ -29,13 +29,13 @@ module BetterAr
|
|
29
29
|
elsif opts.key?(:conditions)
|
30
30
|
super(opts)
|
31
31
|
else
|
32
|
-
relation = clone
|
32
|
+
relation = scoped.clone
|
33
33
|
relation = better_ar_apply_sql_clauses(relation, opts)
|
34
34
|
relation = better_ar_apply_associations(relation, opts)
|
35
35
|
relation.where(opts)
|
36
36
|
end
|
37
37
|
else
|
38
|
-
relation = clone
|
38
|
+
relation = scoped.clone
|
39
39
|
relation.where(opts)
|
40
40
|
end
|
41
41
|
end
|
data/lib/better_ar/version.rb
CHANGED
data/test/test_finder_methods.rb
CHANGED
@@ -44,7 +44,7 @@ describe 'ActiveRecord::Relation Finder Methods' do
|
|
44
44
|
it 'calls #first on .all' do
|
45
45
|
expected = User.create(:age => 10)
|
46
46
|
User.create(:age => 11)
|
47
|
-
User.first(:age => 10).
|
47
|
+
User.first(:age => 10).must_equal expected
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|