eitil 1.3.2 → 1.3.3
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e09221af058e64779e66dc191c93be16a85592f7abc9fb3baca2c758732f04d
|
4
|
+
data.tar.gz: bc3548f2643a9880cda0a9b78c82581afae5413ff09bfe6cd6b01ec6d34a2b43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df035ec77f87a82d84c55a98e4862a83a7f3696c70e9bdafc61df7c93c1c2c0ff002b554e0ae05b2f623bc100dfda09bd17d099293e13c70f54b59e327f2e1f1
|
7
|
+
data.tar.gz: 53995982137b13b5d2c23701748b79d443de3807f150e677af544b1b36301c5e530aafe9f13ec0e3c0dcb43d3d43145fa78f0248e526a5532e46a35db97a8a53
|
@@ -14,8 +14,15 @@ module EitilWrapper
|
|
14
14
|
|
15
15
|
def inherited(subclass)
|
16
16
|
super
|
17
|
-
|
18
17
|
return if Eitil.skip_callback_helper_methods_for_models.include?(subclass.to_s.to_sym)
|
18
|
+
|
19
|
+
# Set the proper table_names for namespaced models. Without setting this,
|
20
|
+
# Rails run into problems due to the fact that the first call to the model's
|
21
|
+
# constant triggers this initializer first, and only thereafter the model file
|
22
|
+
# which sets the correct table_name through a macro.
|
23
|
+
namespaced_class = subclass.to_s.include?('::')
|
24
|
+
subclass.table_name = subclass.to_s.gsub('::', '_').downcase.pluralize if namespaced_class
|
25
|
+
|
19
26
|
subclass.use_eitil_callback_helper_methods
|
20
27
|
|
21
28
|
rescue => e
|
@@ -36,8 +36,15 @@ module EitilWrapper
|
|
36
36
|
|
37
37
|
def inherited(subclass)
|
38
38
|
super
|
39
|
-
|
40
39
|
return if Eitil.skip_default_scopes_for_models.include?(subclass.to_s.to_sym)
|
40
|
+
|
41
|
+
# Set the proper table_names for namespaced models. Without setting this,
|
42
|
+
# Rails run into problems due to the fact that the first call to the model's
|
43
|
+
# constant triggers this initializer first, and only thereafter the model file
|
44
|
+
# which sets the correct table_name through a macro.
|
45
|
+
namespaced_class = subclass.to_s.include?('::')
|
46
|
+
subclass.table_name = subclass.to_s.gsub('::', '_').downcase.pluralize if namespaced_class
|
47
|
+
|
41
48
|
subclass.use_eitil_scopes
|
42
49
|
|
43
50
|
rescue => e
|
data/lib/eitil/version.rb
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eitil
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jurriaan Schrofer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|