By default, views are tied to controllers. So the views in app/views/
c1s are invoked by the app/views/c1s_controller.
However, it is possible to render views from an arbitrary controller.
grep render app/controllers/*. Partials might be called from helpers
or other views.
By default, views are tied to controllers. So the views in app/views/
c1s are invoked by the app/views/c1s_controller.
However, it is possible to render views from an arbitrary controller.
grep render app/controllers/*. Partials might be called from helpers
or other views.
Yes, but a controller can generate several views. Is there a way to get
to the line of code in the controller that generates the view and/or
partial.
There are rules. Of course, an explicit call via render comes first.
If there is no render, then the view with the same name as the action
is rendered.
Which is why a stack trace is not sufficient.
There are rules. Of course, an explicit call via render comes first.
If there is no render, then the view with the same name as the action
is rendered.
Which is why a stack trace is not sufficient.
Are you saying that if the view is rendered via an explicit render that
it will be on the stack trace? (Sorry, not at a computer where I'm
running rails but I'd like to have the answer so I can think about it.)