schema_plus_core 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/schema_plus/core/active_record/base.rb +1 -1
- data/lib/schema_plus/core/version.rb +1 -1
- data/spec/middleware_spec.rb +10 -0
- 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: 5fdcb1b5d55bc09bdff0ca89474a8e550d35b020
|
4
|
+
data.tar.gz: ae536eca65f37ce4eb3686edf7eae712efdfc72d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35f641bf268e73aacf8922e078b3e37a8f03ec35dbc4116f2cc9421f374e9a457059f934b52290392a48aceda41c3b63018974238c4d1188533b99b40e958c92
|
7
|
+
data.tar.gz: eab9a007c118a5f0875c7e1299182c075c306e61d6756a33b4c1dd3eab216760f49780477c914efea55d3d694ec5bdea3a161332cae72e6b55e76f08eda38c19
|
data/README.md
CHANGED
@@ -441,6 +441,7 @@ SchemaPlus::Core provides a state object and of callbacks to various phases of t
|
|
441
441
|
|
442
442
|
## Release Notes
|
443
443
|
|
444
|
+
* 2.1.1 Bug fix: Don't lose habtm options. Thanks to [@iagopiimenta ](https://github.com/iagopiimenta)
|
444
445
|
* 2.1.0 Added AR5.1 support. Thanks to [@iagopiimenta ](https://github.com/iagopiimenta)
|
445
446
|
* 2.0.1 Tighten up AR dependency. Thanks to [@myabc](https://github.com/myabc).
|
446
447
|
* 2.0.0 Added AR5 support, removed AR4.2 support. Thanks to [@boazy](https://github.com/boazy).
|
@@ -32,7 +32,7 @@ module SchemaPlus
|
|
32
32
|
end.result
|
33
33
|
end
|
34
34
|
|
35
|
-
def has_and_belongs_to_many(name, scope = nil, options
|
35
|
+
def has_and_belongs_to_many(name, scope = nil, **options, &extension)
|
36
36
|
SchemaMonkey::Middleware::Model::Association::Declaration.start(model: self, name: name, scope: scope, options: options, extension: extension) do |env|
|
37
37
|
env.result = super(env.name, env.scope, env.options, &env.extension)
|
38
38
|
end.result
|
data/spec/middleware_spec.rb
CHANGED
@@ -117,6 +117,16 @@ describe SchemaMonkey::Middleware do
|
|
117
117
|
expect_middleware { Thingamajig.belongs_to :another_thing, class_name: Thing.name }
|
118
118
|
expect_middleware { Thingamajig.has_and_belongs_to_many :other_things, class_name: Thing.name }
|
119
119
|
end
|
120
|
+
|
121
|
+
Then do
|
122
|
+
class TestThingamajig < ActiveRecord::Base
|
123
|
+
has_and_belongs_to_many :other_things, join_table: 'another_table'
|
124
|
+
end
|
125
|
+
|
126
|
+
expect(
|
127
|
+
TestThingamajig.reflect_on_association(:other_things).options[:join_table]
|
128
|
+
).to eq('another_table')
|
129
|
+
end
|
120
130
|
end
|
121
131
|
|
122
132
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schema_plus_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ronen barzel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|