yiffspace 0.1.2 → 0.1.3
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/lib/yiffspace/utils/helpers.rb +7 -2
- data/lib/yiffspace/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 90b1f47c104bb13e62b4cc92703a8dcbaf2dbdfe6c0c9e9a912b43d2a63eb79e
|
|
4
|
+
data.tar.gz: a708e4becdcf314c34c47af4574bd89e4e97985ccb61c2dafcc09889768851d1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: db87381f37b0c7b16ddea8eddfafd6f4e0923b380f1b4a48d5c7359b7867da002309fc7618662596ff57cad975f02efa668feb35b537d8595c9aca0c8ce80312
|
|
7
|
+
data.tar.gz: a2b3501b91f56da362c7de64de11493638600e0ffe0caa7df9eeb2248e8e230bd30c7592cd63108c96d8ab42db70ad017279842bc7a16cc46058ba10f28ea9d3
|
|
@@ -5,15 +5,20 @@ module YiffSpace
|
|
|
5
5
|
module Helpers
|
|
6
6
|
module_function
|
|
7
7
|
|
|
8
|
+
# Uses send/respond_to?(name, true) (not public_send/respond_to?(name)) because host apps
|
|
9
|
+
# commonly call helpers through this proxy with an explicit receiver (e.g. a decorator's
|
|
10
|
+
# `h.some_helper`), including ones marked private in their helper module - private only
|
|
11
|
+
# restricts calling with an explicit receiver, and normal view rendering (which invokes
|
|
12
|
+
# helpers without one) isn't affected either way.
|
|
8
13
|
def method_missing(name, *, &)
|
|
9
14
|
helpers = YiffSpace.config.application_controller_class.helpers
|
|
10
|
-
return helpers.
|
|
15
|
+
return helpers.send(name, *, &) if helpers.respond_to?(name, true)
|
|
11
16
|
|
|
12
17
|
super
|
|
13
18
|
end
|
|
14
19
|
|
|
15
20
|
def respond_to_missing?(name, include_private = false)
|
|
16
|
-
YiffSpace.config.application_controller_class.helpers.respond_to?(name,
|
|
21
|
+
YiffSpace.config.application_controller_class.helpers.respond_to?(name, true) || super
|
|
17
22
|
end
|
|
18
23
|
end
|
|
19
24
|
end
|
data/lib/yiffspace/version.rb
CHANGED