pupper 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pupper/api_associations.rb +5 -8
- data/lib/pupper/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 691ae8c03c3853270c769eeb8f2843c58fd35e69
|
4
|
+
data.tar.gz: 1226c5952381f25be872736d53c46b8f5f77c4ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21197fda988bfd1f751c54a56ac3fd22d871fcb1bbf883992edfa3d92ac9363348bb8e2dcc056339536dc0c130ffaeb06db0176c29e7c3f41817c2acf3c66376
|
7
|
+
data.tar.gz: eb940c6c849d64ac3062a3479201a55e288230007d83cd52bf24084df55bb778d6d6750f1d876914a4c45b5de18ca1f8389242a882de63267ccb87e24c4f4959
|
@@ -7,12 +7,12 @@ module Pupper
|
|
7
7
|
@associations ||= { has_one: [], has_many: [] }
|
8
8
|
end
|
9
9
|
|
10
|
-
def has_one(
|
11
|
-
associations[:has_one]
|
10
|
+
def has_one(*assocs)
|
11
|
+
associations[:has_one].concat(assocs)
|
12
12
|
end
|
13
13
|
|
14
|
-
def has_many(
|
15
|
-
associations[:has_many]
|
14
|
+
def has_many(*assocs)
|
15
|
+
associations[:has_many].concat(assocs)
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
@@ -34,11 +34,8 @@ module Pupper
|
|
34
34
|
|
35
35
|
def create_attribute(name, foreign_key = nil, value = nil)
|
36
36
|
self.class.attr_accessor(name)
|
37
|
-
|
38
|
-
return unless foreign_key.present?
|
39
|
-
|
40
37
|
excluded_attrs << name if foreign_key.present?
|
41
|
-
send("#{name}
|
38
|
+
send("#{name}=", value)
|
42
39
|
end
|
43
40
|
|
44
41
|
def find_assoc_type(name)
|
data/lib/pupper/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pupper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lee Machin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|