How do I determine if a helper is being called in a partial?
I need to do this to modify core helpers to act differently in partials.
Thanks!
How do I determine if a helper is being called in a partial?
I need to do this to modify core helpers to act differently in partials.
Thanks!
Ben J. wrote:
How do I determine if a helper is being called in a partial?
I need to do this to modify core helpers to act differently in partials.
Thanks!
well, a REALLY basic way could be:
!(caller.to_s =~ /render_partial/).nil?
there’s probably a better way though
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs