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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3108ded87e7821a25a8078a56cc0a100a0a04b63
4
- data.tar.gz: 75dcfb3c8dbd226df06c498bfe1bdc8886deeab4
3
+ metadata.gz: 243aa28c10fb63bee6a720f3eee4e55a4a35e169
4
+ data.tar.gz: 86d74cbe6f6cf33f1f26ff35806f560e23c51663
5
5
  SHA512:
6
- metadata.gz: c20258a1f27e97756888d023bb063b17d283aac9514abe7eb2c3e361c1e5b5dcd701ca722671ed270eae4b10443fd6be64bd5e2d4b759f7b5e707751a9c902f7
7
- data.tar.gz: c3ab5dce7e8efb3e5527d8bb6478936a5620e4336a25b794f7eec80ab2a68badea1b534bed6156f43efa352208619d39eebe754699d450f3d2b51ee24f1cb059
6
+ metadata.gz: 550299c36dc15e67c9db7f834d94cb42e249d2bb5508403836514997add22aa53c4c77184b9327b4b1b164b46d49160fed09ef1c0e961157f0374a3e4418c435
7
+ data.tar.gz: e62db52d32bc727d43e5c2ea19a13ffc97fe0ac9bed28f934c7f21cafb6d2145b468151bcbafa00f43ee327ef800b123ed2efad9f6fed6d7e638a3e55dbeef99
@@ -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(:prepend, GlobalUid::HasAndBelongsToManyBuilderExtension)
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 through_model
4
- model = super
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.0
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: 2015-12-30 00:00:00.000000000 Z
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.0'
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.0'
32
+ version: '5.1'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: activesupport
35
35
  requirement: !ruby/object:Gem::Requirement