Anyone know if there is a way to detect whether a request came from a
render_component call? There isn’t anything obvious from looking at the
source, but it would be useful as I have set up a logging filter in my
application.rb, and I’d prefer to exclude all component renders, since
they just add extra lines to my log (I guess I could exclude identical
rows at the db level).
I’m thinking of something like the xhr? method that allows a controller
to check whether a request came from an ajax submission.
I was guessing that the same check that catches the double_render error
might be used, but the check it uses (performed?) is a private method. I
guess I could try re-rendering the same controller/action and test
whether it leads to a DoubleRender error, but I imagine that would be
Ideally some kind of :component => true element/value in the options
would be cool …