eac_rails_utils 0.9.1 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/helpers/eac_rails_utils/links_helper.rb +8 -1
- data/lib/eac_rails_utils/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ab860f53094962e32a5e54686f4cb83382c0a60509837057e68f64c649c3d97b
|
|
4
|
+
data.tar.gz: e14470c3dca4c307484ea19896c3b6742ab797a0fdf97b80737624fc03209b57
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 11a1e93764e5dc3d5fa6a362ad518bbbcc451962e6240038d840e2c46ae71dc63b5a14fa3af6b9cac56295e0b92d07c0bb34dd2c22d02df9961f2052e36f2bde
|
|
7
|
+
data.tar.gz: c846e7c3205d37f615bbcd2f321cd99ef1e4e6ee4e90e6aa68c809eb97b2610f1543e2ba55d4b455067d180a6c9ba58bcfd74b606229ca3720c8f2bb0ab0c778
|
|
@@ -35,7 +35,7 @@ module EacRailsUtils
|
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
def object_path(object, action = nil)
|
|
38
|
-
current_class = object
|
|
38
|
+
current_class = object_class(object)
|
|
39
39
|
tried_paths = []
|
|
40
40
|
while current_class
|
|
41
41
|
path = object_path_by_class(current_class, action)
|
|
@@ -68,5 +68,12 @@ module EacRailsUtils
|
|
|
68
68
|
path = "#{action}_#{path}" if action.present?
|
|
69
69
|
path
|
|
70
70
|
end
|
|
71
|
+
|
|
72
|
+
def object_class(object)
|
|
73
|
+
return object.entity_class if object.respond_to?(:entity_class)
|
|
74
|
+
return object.__getobj__.class if object.respond_to?(:__getobj__)
|
|
75
|
+
|
|
76
|
+
object.class
|
|
77
|
+
end
|
|
71
78
|
end
|
|
72
79
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: eac_rails_utils
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- E.A.C.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-03-
|
|
11
|
+
date: 2020-03-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activemodel-associations
|