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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c1b12ec6ea364b851a57f1eaea76dd5e9400d1d5
4
- data.tar.gz: 61340f6365bca431263862be69a6806feab5cc9b
3
+ metadata.gz: c0abd9c4a43817436d719c13997751ca837f7da7
4
+ data.tar.gz: 72f4114a37ef358ab72308ff1e88235527273df6
5
5
  SHA512:
6
- metadata.gz: 46ff9adae2d5bc65c65a7b46b826d2bbcb2b2b1fdddd9e528b2f809966f2f053457a8e4240ed804f70996e8b15b715e8ffaaa3029f87969a9f89f70b2a0b716f
7
- data.tar.gz: b71c56097afe92358badbe84a93352a397004df78d04a10a28c5734cc7a4ec0663b60291c5fa105af54b0f71ed5809f70a8d434cb5d1cd14604e8e082024f861
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
@@ -1,3 +1,3 @@
1
1
  module BetterAr
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -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).age.must_equal expected.age
47
+ User.first(:age => 10).must_equal expected
48
48
  end
49
49
  end
50
50
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: better_ar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Cardarella