-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The theme selector method is not invoked in some situations. #59
Comments
Jarl, thanks fo the detailed response. So you are calling the :theme method from the view? What are you trying to achieve? Hit me on freenode, #rubysur. |
Btw, you can declare the :theme method as a helper_method and have it available on the view (if that's what you want) without having to touch the TFR codebase. |
OK, I'll try to catch you later on IRC, what nick? |
lucasefe On Thu, Jun 14, 2012 at 9:54 AM, Jarl Friis <
|
Ok, this is valid issue. I'll start working on fix. Good catch. |
I have theme_resolver method like this:
The first time
theme_resolver
is invoked is prior to the action, so it returns nil.Next time it is invoked is at the time of render, at this time it is invoked as a method included in the my
ActionView
view. At this time the line (in common_methods.rb:12)returns nil, because
self.respond_to?(@theme_name, true)
evaluates to false because the theme_resolver is not member of the view (it's a member of the controller) so thetheme_resolver
is not invoked at all.I suggest changing that line to something like
or something like that.
Meanwhile I have to invoke (as a workaround)
to set and cache the theme_name before my action method reach the render code.
Jarl
The text was updated successfully, but these errors were encountered: