store-active_record 0.0.8 → 0.0.9

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: ec6a0c9433686aa65ea4471267dbbc55b2499d6c
4
- data.tar.gz: c4eb194ae78343644a62a32a058117405c0373d0
3
+ metadata.gz: 06f93e0e4c6c46c21586b804439ccd7db50bc07f
4
+ data.tar.gz: 8151033e2c0b28631ecaf3c6e1869e17ec534f2b
5
5
  SHA512:
6
- metadata.gz: b2c87bd214134cdfb2fb22ea671831fdddcdce0be1b4825b8bb0def5b2ca0ccde375fa1eb5cb05c6226a6da4a7367e1172c73c19393dbeefb06bbd34f4e74b92
7
- data.tar.gz: fe61a6cdbfa806d5163b461f0cb59c3035588247cfb68f8e6faaa26459ee9a03a517446b449f7d2733f19837307fa028659c2160bb40582fb1ed80baf7e25e93
6
+ metadata.gz: d309d61d61127edef84588d6b1849516a4d6c9e58caa35f4bda860552c80d05ee35e39202b858cb22bbfed684e8d2b93d24fc34cf607abee7fbc32cb654d63f7
7
+ data.tar.gz: 58aba3803a6cdd80a398d376d6882928064ec1f86ae45ad5975c87e6abadc7ff79962f51669b30a924611e294a29eb6551fa9e6e3a02e2bedba28d017ca2501b
@@ -1,5 +1,5 @@
1
1
  class Store
2
2
  class ActiveRecord
3
- VERSION = "0.0.8"
3
+ VERSION = "0.0.9"
4
4
  end
5
5
  end
@@ -17,17 +17,23 @@ class Store
17
17
  end
18
18
 
19
19
  def update(id, data)
20
- find_by_id(id).update_attributes(data)
20
+ if found = find_by_id(id)
21
+ found.update_attributes(data)
22
+ end
21
23
  id
22
24
  end
23
25
 
24
26
  def delete(id)
25
- find_by_id(id).delete
27
+ if found = find_by_id(id)
28
+ found.delete
29
+ end
26
30
  id
27
31
  end
28
32
 
29
33
  def single_find(id)
30
- find_by_id(id).to_hash
34
+ if found = find_by_id(id)
35
+ found.to_hash
36
+ end
31
37
  rescue ::ActiveRecord::RecordNotFound
32
38
  nil
33
39
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: store-active_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Owiesniak