global_uid 3.3.0 → 3.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/global_uid.rb +1 -1
- data/lib/global_uid/has_and_belongs_to_many_builder_extension.rb +9 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 243aa28c10fb63bee6a720f3eee4e55a4a35e169
|
4
|
+
data.tar.gz: 86d74cbe6f6cf33f1f26ff35806f560e23c51663
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 550299c36dc15e67c9db7f834d94cb42e249d2bb5508403836514997add22aa53c4c77184b9327b4b1b164b46d49160fed09ef1c0e961157f0374a3e4418c435
|
7
|
+
data.tar.gz: e62db52d32bc727d43e5c2ea19a13ffc97fe0ac9bed28f934c7f21cafb6d2145b468151bcbafa00f43ee327ef800b123ed2efad9f6fed6d7e638a3e55dbeef99
|
data/lib/global_uid.rb
CHANGED
@@ -20,7 +20,7 @@ if defined?(ActiveRecord::SchemaMigration)
|
|
20
20
|
end
|
21
21
|
|
22
22
|
if ActiveRecord::VERSION::STRING >= '4.1.0'
|
23
|
-
ActiveRecord::Associations::Builder::HasAndBelongsToMany.send(:
|
23
|
+
ActiveRecord::Associations::Builder::HasAndBelongsToMany.send(:include, GlobalUid::HasAndBelongsToManyBuilderExtension)
|
24
24
|
end
|
25
25
|
|
26
26
|
if ActiveRecord::VERSION::MAJOR >= 4
|
@@ -1,7 +1,14 @@
|
|
1
1
|
module GlobalUid
|
2
2
|
module HasAndBelongsToManyBuilderExtension
|
3
|
-
def
|
4
|
-
|
3
|
+
def self.included(base)
|
4
|
+
base.class_eval do
|
5
|
+
alias_method :through_model_without_inherit_global_uid_disabled_from_lhs, :through_model
|
6
|
+
alias_method :through_model, :through_model_with_inherit_global_uid_disabled_from_lhs
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
def through_model_with_inherit_global_uid_disabled_from_lhs
|
11
|
+
model = through_model_without_inherit_global_uid_disabled_from_lhs
|
5
12
|
model.disable_global_uid if model.left_reflection.klass.global_uid_disabled
|
6
13
|
model
|
7
14
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: global_uid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Osheroff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 3.2.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '5.
|
22
|
+
version: '5.1'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: 3.2.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '5.
|
32
|
+
version: '5.1'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: activesupport
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|