sequel_polymorphic 0.3.0 → 0.3.1

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: 40692adf771cb2a12a5b63b1fdcec4751b8b5129
4
- data.tar.gz: a46f8b67073537358ce9ce3963afe9872f891ece
3
+ metadata.gz: 868e62f45832d89c8ddf9082692464f80a6e387d
4
+ data.tar.gz: '0995011550be7e6b523901eb143721da6b21f68c'
5
5
  SHA512:
6
- metadata.gz: 4ef4dece915847592c3d950a120c2c871cd9c87d2d93f220740835ab97a4d4e77fca11d006ffc39750ae6c953bfbae1849b3a452ed3768ea8af87d0d96871aab
7
- data.tar.gz: 86071652a3e9eec1c8216b3f2539fc0e2e1191613614a23706f3e7dcbd7f709bc3bc66a43fd5d1ca7b5df63d56bf892bebeb217d0195b15485d69078a7ce5e5a
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
@@ -2,7 +2,7 @@ module Sequel
2
2
  module Plugins
3
3
  module Polymorphic
4
4
 
5
- VERSION = '0.3.0'
5
+ VERSION = '0.3.1'
6
6
 
7
7
  end # Polymorphic
8
8
  end # Plugins
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.0
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: 2016-12-22 00:00:00.000000000 Z
13
+ date: 2017-01-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: sequel