husky 0.5.8 → 0.5.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/husky/repo.rb +6 -1
- data/lib/husky/version.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: aca4c22701d93fa574ddc7f27bbb28782e574b11
|
4
|
+
data.tar.gz: f72fa23a1fb8ffbf2ad8c7df902d5fa67b019a5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b92f873fa0a8a15f4c7999f011f06c45e7c4fa8ede668f172f862e55be997f5de89536113d8ebbceab03c50124e15d68b97a28e97082fbc19a4df67e9a0fbf97
|
7
|
+
data.tar.gz: 4cd82d9e95ebe6162ca76d554815aa154b29dcc5a50ed4634bce557c31bc9a4077db46690da2f6751170ef5d517726d576a3152c1dffc1ff37f7a32a1b76ddde
|
data/lib/husky/repo.rb
CHANGED
@@ -65,11 +65,16 @@ module Husky
|
|
65
65
|
end
|
66
66
|
|
67
67
|
def find(id)
|
68
|
-
entity.build(
|
68
|
+
entity.build(get_record(id))
|
69
|
+
end
|
70
|
+
|
71
|
+
def get_record(id)
|
72
|
+
@records[id.to_i]
|
69
73
|
end
|
70
74
|
|
71
75
|
def save(object)
|
72
76
|
object.id = @id
|
77
|
+
object.update_attributes({ id: @id })
|
73
78
|
@records[@id] = object
|
74
79
|
@id += 1
|
75
80
|
entity.build(object)
|
data/lib/husky/version.rb
CHANGED