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. <!-- BEGIN path/from/rails/root/to/some/file.rhtml --> normally rendered page here. <!-- END --> Reasoning: 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. Restrictions: 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. Clarification: 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. -- - kate = masukomi
The Textmate Footnotes plugin (http://agilewebdevelopment.com/plugins/ textmate_footnotes) by Canada Duane (http://inquirylabs.com/) does something close to what you want. It doesn''t handle partials, but it will give you Textmate links to the view and controller loaded in the browser. -- Benjamin Curtis http://www.bencurtis.com/ http://www.tesly.com/ -- Collaborative test case management http://www.agilewebdevelopment.com/ -- Resources for the Rails community On Jun 21, 2006, at 10:14 AM, kate rhodes wrote:> 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. > > <!-- BEGIN path/from/rails/root/to/some/file.rhtml --> > normally rendered page here. > <!-- END --> > > Reasoning: > 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. > > Restrictions: > 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. > > Clarification: > 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. > > > -- > - kate = masukomi > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
On 6/21/06, Benjamin Curtis <rails@bencurtis.com> wrote:> The Textmate Footnotes plugin (http://agilewebdevelopment.com/plugins/ > textmate_footnotes) by Canada Duane (http://inquirylabs.com/) does > something close to what you want. It doesn''t handle partials, but it > will give you Textmate links to the view and controller loaded in the > browser.yeah, I need all, especially partials, and I run linux so Textmate doesn''t really help me. but thanks for the tip. -kate = masukomi
kate rhodes wrote:> On 6/21/06, Benjamin Curtis <rails@bencurtis.com> wrote: >> The Textmate Footnotes plugin (http://agilewebdevelopment.com/plugins/ >> textmate_footnotes) by Canada Duane (http://inquirylabs.com/) does >> something close to what you want. It doesn''t handle partials, but it >> will give you Textmate links to the view and controller loaded in the >> browser. > > yeah, I need all, especially partials, and I run linux so Textmate > doesn''t really help me. > > but thanks for the tip.I''ve emailed kate off list with a zip of a quick plugin which does what she wants. My SVN is playing up at the moment, but I''ll put it up there when it''s back to normality. In the meantime, if anyone wants a copy too then drop me a line and I''ll send them the zip. Thanks - was a fun little exercise digging around Rails :o) -- R.Livsey http://livsey.org
Cayce Balara
2006-Jun-21 20:21 UTC
[Rails] Re: [Bounty] 1 pizza for 1 simple plugin (sort of off-topic)
< 3 hours turnaround. wow. I used to work for PeopleSoft and our internal distribution lists were that good, nice to see it working out in the open. Can I have a slice of pizza? yb Richard Livsey wrote:> kate rhodes wrote: >> but thanks for the tip. > I''ve emailed kate off list with a zip of a quick plugin which does what > she wants. My SVN is playing up at the moment, but I''ll put it up there > when it''s back to normality. > > In the meantime, if anyone wants a copy too then drop me a line and I''ll > send them the zip. > > Thanks - was a fun little exercise digging around Rails :o)-- Posted via http://www.ruby-forum.com/.
Cayce Balara
2006-Jun-21 20:24 UTC
[Rails] Re: [Bounty] 1 pizza for 1 simple plugin (sort of off-topic)
Richard I don''t see a means of contacting you other than posting here. I''d like a copy of the zip, please. many tks. -- Posted via http://www.ruby-forum.com/.
Richard: I developed something similar to this a long time ago... what did you end up using? Just overriding ActionView::Base#render? On 6/21/06, Richard Livsey <richard@livsey.org> wrote:> > kate rhodes wrote: > > On 6/21/06, Benjamin Curtis <rails@bencurtis.com> wrote: > >> The Textmate Footnotes plugin (http://agilewebdevelopment.com/plugins/ > >> textmate_footnotes) by Canada Duane (http://inquirylabs.com/) does > >> something close to what you want. It doesn''t handle partials, but it > >> will give you Textmate links to the view and controller loaded in the > >> browser. > > > > yeah, I need all, especially partials, and I run linux so Textmate > > doesn''t really help me. > > > > but thanks for the tip. > > I''ve emailed kate off list with a zip of a quick plugin which does what > she wants. My SVN is playing up at the moment, but I''ll put it up there > when it''s back to normality. > > In the meantime, if anyone wants a copy too then drop me a line and I''ll > send them the zip. > > Thanks - was a fun little exercise digging around Rails :o) > > -- > R.Livsey > http://livsey.org > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060621/520191e9/attachment.html
Richard Livsey
2006-Jun-21 21:27 UTC
[Rails] Re: [Bounty] 1 pizza for 1 simple plugin (sort of off-topic)
Cayce Balara wrote:> Richard I don''t see a means of contacting you other than posting here. > I''d like a copy of the zip, please. > > many tks. >I''ve put it here temporarily. http://livsey.org/files/annotate_renders.zip Thanks. -- R.Livsey http://livsey.org
Brian Hogan wrote:> Richard: > > I developed something similar to this a long time ago... what did you > end up using? Just overriding ActionView::Base#render? >Pretty much yeah. Noticed it all gets called to ActionView::Base#render_file so overrode that. -- R.Livsey http://livsey.org
Pete
2006-Jun-21 21:52 UTC
[Rails] Re: [Bounty] 1 pizza for 1 simple plugin (sort of off-topic)
so where''s the pizza? :-) Richard Livsey schrieb:> Cayce Balara wrote: >> Richard I don''t see a means of contacting you other than posting >> here. I''d like a copy of the zip, please. >> >> many tks. >> > > I''ve put it here temporarily. > > http://livsey.org/files/annotate_renders.zip > > Thanks. >
>I''ve emailed kate off list with a zip of a quick plugin which does what > she wants. My SVN is playing up at the moment, but I''ll put it up there > when it''s back to normality.Hooray for Richard! It works great. Absolute paths instead of relative but that''s close enough for pizza! Haven''t tested against web services and all that. Don''t forget to add it to the Rails Plugins Dir when you get your svn up Richard. http://plugins.radrails.org/ Thanks Richard. -- - kate = masukomi
probably a good idea to remove the \n in it. I didn''t think of it when i originally posted but every now and then you have to get rid of whitespace in html because the browsers decide to do stupid things with it.
kate rhodes wrote:> probably a good idea to remove the \n in it. I didn''t think of it when > i originally posted but every now and then you have to get rid of > whitespace in html because the browsers decide to do stupid things > with it.Good point. The whitespace did make it easier to read, but yeah some browsers (IE especially) may freak! Have removed that. The paths are now from the rails root, and it only outputs the paths in development mode (or when logger.debug? is true). My svn is back up now, so it''s available at http://svn.livsey.org/plugins/ Oh, and don''t worry about the pizza - I did it for fun :o) Thanks! -- R.Livsey http://livsey.org
Posted at http://agilewebdevelopment.com/plugins/annotate_renders :) -- Benjamin Curtis http://www.bencurtis.com/ http://www.tesly.com/ -- Collaborative test case management http://www.agilewebdevelopment.com/ -- Resources for the Rails community On Jun 21, 2006, at 4:32 PM, Richard Livsey wrote:> kate rhodes wrote: >> probably a good idea to remove the \n in it. I didn''t think of it >> when >> i originally posted but every now and then you have to get rid of >> whitespace in html because the browsers decide to do stupid things >> with it. > > Good point. The whitespace did make it easier to read, but yeah > some browsers (IE especially) may freak! Have removed that. > > The paths are now from the rails root, and it only outputs the > paths in development mode (or when logger.debug? is true). > > My svn is back up now, so it''s available at http://svn.livsey.org/ > plugins/ > > Oh, and don''t worry about the pizza - I did it for fun :o) > > Thanks! > > -- > R.Livsey > http://livsey.org > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
> The paths are now from the rails root, and it only outputs the paths in > development mode (or when logger.debug? is true).ooh i like that idea. My svn is back up now, so it''s available at http://svn.livsey.org/plugins/ yay Oh, and don''t worry about the pizza - I did it for fun :o) whoot. :) Thanks again richard. -- - kate = masukomi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060622/ddd5e49a/attachment.html