How to determine if you are in a partial?

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