So here’s the deal. I don’t know the innards of rails well enough to
do this quickly but you might. First person to write this and release
it under MIT license or public domain, and tells me, gets a free
pizza from your favorite local delivery place. You pick the toppings,
I’ll call 'em and order it up for you. Yeah a pizza isn’t much but I’m
relatively broke and this is probably a quicky, would be useful to
many people, and an interesting challenge for someone.
I want a plugin that will add the following HTML comment to the top
and bottom of EVERY rendered rhtml page. This includes all partials
and layout files.
normally rendered page here.
This allows you to just “view source” on any web page and see exactly
what file your bug is in. I’ve been doing it manually for years and it
can save a lot of time.
Has to ONLY affect pages destined for browsers, not web services or
anything like that. Obviously it has to be the actual path no just the
static string “path/from/rails/root/to/some/file.rhtml”
It’s preferable to have no config required at all. Just drop the
plugin in. Indicating what actions it would apply to in the controller
would be fine too. Specifying something in every file you want it to
appear around isn’t acceptable since you may as well put that tags in
yourself if you’re going to do that.
Just to be clear this would result in a page that was littered with
these comments around the layout, and essentially every render_* tag.
If you had a render in a loop it would end up with these comments
around every one.