dao-repository 1.1.1 → 1.1.2

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: 4ddd25f7645a1099f8d52290266af25994908fc5
4
- data.tar.gz: 350a8ddd28bf0e82e88150be053437f5f18e9d27
3
+ metadata.gz: f2d02019d262a0867dc9fa96dc5364c34e09ebf7
4
+ data.tar.gz: 5ef740be7f00a0d171a2efe5186e4fae02c9b7d0
5
5
  SHA512:
6
- metadata.gz: 624fdd200b83aeaceca5ea04fd4d11db18622ad21067fe05625492d2561f95841dafaef94a38798a4f09c4f50e3d56b18fc804e357a890ec97b5574e344dbda2
7
- data.tar.gz: fed37a0fd1b775d710b1c71d47a2ff9952353a5fc347ae0f59251271d70fee4cda97c3ecafaec9c112ede2317ce8c8c98d9e3db69267e6aa4d016de2a1ca74a6
6
+ metadata.gz: 8dc9076f70640c23176a226a6fdfa96335c53f6ddd0a7a73954ea398feb24c54a322edb5f4bbc704818f49b38f293e8b526c8436e6b7a372705b69e85c5cf2f0
7
+ data.tar.gz: bb7470f28110c84e2e137aaf777eaa715d60f7f69c6f1fcc10317f1b2bd6d0ce94f10cd520e663c56dab5a116b95413217837d16e0a4b76b917f473fdf693fc2
@@ -21,9 +21,11 @@ module Dao
21
21
  end
22
22
 
23
23
  def find(id, with: nil)
24
- attributes = {}
25
- attributes[:with] = with if with
26
- scope.find(id, attributes).apply
24
+ if with
25
+ scope.find(id, with: with).apply
26
+ else
27
+ scope.find(id).apply
28
+ end
27
29
  end
28
30
 
29
31
  def find_by_id(id)
@@ -31,9 +33,11 @@ module Dao
31
33
  end
32
34
 
33
35
  def last(with: nil)
34
- attributes = {}
35
- attributes[:with] = with if with
36
- scope.last(attributes).apply
36
+ if with
37
+ scope.last(with: with).apply
38
+ else
39
+ scope.last.apply
40
+ end
37
41
  end
38
42
 
39
43
  def count
@@ -1,5 +1,5 @@
1
1
  module Dao
2
2
  module Repository
3
- VERSION = '1.1.1'
3
+ VERSION = '1.1.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dao-repository
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - llxff