tanga_namespaced_helpers 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
@@ -23,7 +23,7 @@ module TangaNamespacedHelpers
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def self.use_controller!
|
26
|
-
@view = @original_context
|
26
|
+
@view = @original_context if @original_context
|
27
27
|
end
|
28
28
|
|
29
29
|
# TODO Gotta be a better way to do this.
|
@@ -38,8 +38,11 @@ module TangaNamespacedHelpers
|
|
38
38
|
# So, if there's a NoMethodError (i.e. access the session after ActionMailer
|
39
39
|
# resets the context), we need to reset it to the original controller
|
40
40
|
# for the request and try one more time.
|
41
|
-
TangaNamespacedHelpers.use_controller!
|
42
|
-
|
41
|
+
if TangaNamespacedHelpers.use_controller!
|
42
|
+
view.send *args, &block
|
43
|
+
else
|
44
|
+
raise
|
45
|
+
end
|
43
46
|
end
|
44
47
|
|
45
48
|
module ControllerMethods
|