sequel_polymorphic 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +12 -0
- data/lib/sequel_polymorphic/sequel_polymorphic.rb +4 -4
- data/lib/sequel_polymorphic/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: 868e62f45832d89c8ddf9082692464f80a6e387d
|
|
4
|
+
data.tar.gz: '0995011550be7e6b523901eb143721da6b21f68c'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7415a5e08d53faa1375c24a7ee4b574bea1c94ba6b01927d798177f331725e6311554c0b9e1784f6bd69fe8963f0bf9a84a4b09b42c7cfe09bacb4ef55028b8b
|
|
7
|
+
data.tar.gz: 2122bc2e699b66f7b619238ab771a9e41997e1099a2d9d4ebb3311b592a84a1765c62ce43ada77f9781e5eed151c6e6936a62caf844ef359204b99320b983b48
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# 0.3.1 (2017-01-05) 0.3.1
|
|
2
|
+
|
|
3
|
+
* **Fix**: *blocks are not passed to `associate`*.
|
|
4
|
+
|
|
5
|
+
See [#21](https://github.com/jackdempsey/sequel_polymorphic/pull/21).
|
|
6
|
+
Thanks to [@shioyama](https://github.com/shioyama).
|
|
7
|
+
|
|
1
8
|
# 0.3.0 (2016-12-12) 0.3.0
|
|
2
9
|
|
|
3
10
|
* **Feature**: *add one-to-one polymorphic associations support*.
|
data/README.md
CHANGED
|
@@ -45,3 +45,15 @@ end
|
|
|
45
45
|
### More usage examples
|
|
46
46
|
|
|
47
47
|
See [specs](https://github.com/jackdempsey/sequel_polymorphic/tree/master/spec).
|
|
48
|
+
|
|
49
|
+
## Important note
|
|
50
|
+
|
|
51
|
+
See [here](https://github.com/jackdempsey/sequel_polymorphic/issues/20).
|
|
52
|
+
|
|
53
|
+
## Feedback and contribute
|
|
54
|
+
|
|
55
|
+
<https://github.com/jackdempsey/sequel_polymorphic>
|
|
56
|
+
|
|
57
|
+
## License
|
|
58
|
+
|
|
59
|
+
MIT
|
|
@@ -54,7 +54,7 @@ module Sequel
|
|
|
54
54
|
end
|
|
55
55
|
end)
|
|
56
56
|
}.merge(options)
|
|
57
|
-
associate(:many_to_one, able, association_options)
|
|
57
|
+
associate(:many_to_one, able, association_options, &block)
|
|
58
58
|
else
|
|
59
59
|
associate(:many_to_one, *args, &block)
|
|
60
60
|
end
|
|
@@ -84,7 +84,7 @@ module Sequel
|
|
|
84
84
|
:remover => proc { |many_of_instance| many_of_instance.update(able_id => nil, able_type => nil) },
|
|
85
85
|
:clearer => proc { send(many_dataset_name).update(able_id => nil, able_type => nil) }
|
|
86
86
|
}.merge(options)
|
|
87
|
-
associate(:one_to_many, collection_name, association_options)
|
|
87
|
+
associate(:one_to_many, collection_name, association_options, &block)
|
|
88
88
|
else
|
|
89
89
|
associate(:one_to_many, *args, &block)
|
|
90
90
|
end
|
|
@@ -115,7 +115,7 @@ module Sequel
|
|
|
115
115
|
:remover => proc { |many_of_instance| through_klass.where(collection_singular_id => many_of_instance.pk, able_id => pk, able_type => self.class.to_s).delete },
|
|
116
116
|
:clearer => proc { through_klass.where(able_id => pk, able_type => self.class.to_s).delete }
|
|
117
117
|
}.merge(options)
|
|
118
|
-
associate(:many_to_many, collection_name, association_options)
|
|
118
|
+
associate(:many_to_many, collection_name, association_options, &block)
|
|
119
119
|
|
|
120
120
|
else
|
|
121
121
|
associate(:many_to_many, *args, &block)
|
|
@@ -144,7 +144,7 @@ module Sequel
|
|
|
144
144
|
:remover => proc { |many_of_instance| many_of_instance.update(able_id => nil, able_type => nil) },
|
|
145
145
|
:clearer => proc { send(many_dataset_name).update(able_id => nil, able_type => nil) }
|
|
146
146
|
}.merge(options)
|
|
147
|
-
associate(:one_to_one, collection_name, association_options)
|
|
147
|
+
associate(:one_to_one, collection_name, association_options, &block)
|
|
148
148
|
else
|
|
149
149
|
associate(:one_to_one, *args, &block)
|
|
150
150
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sequel_polymorphic
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jack Dempsey
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date:
|
|
13
|
+
date: 2017-01-05 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: sequel
|