I was just editing some legacy code in dreamweaver and had forgotten the wealth of autocompletey goodness that it offers. Since we don''t have a good equivalent autocomplete, really, for rails, here''s an idea, that I have no time to work on, but which would be a great addition to the stable of apps out there: If we could hook into the rdoc output, or just spider http://api.rubyonrails.org, and provide a simple (yub-nub) type textbox with ajaxified autocomplete.. so you start typing [ has_m ] and it drops down with the whole api for has_many, with your options.. .. ... now, this wouldn''t be complete without my signature feature-bleeding. here goes: - the dropdown allows you to select options and construct the whole options hash which you can paste into the app (find :all, :conditions.. etc - you can optionally save these, send ''em around with a unique link - paste in some code to validate its options (a troubleshooter, partially addressed with this http://dev.rubyonrails.org/ticket/1653) - hook into a wiki, or *the* wiki, http:/wiki.rubyonrails.org to show wikified entries related to the method - generalize the whole thing, let anything that can be rdoc''ed, get autocomplete Any more ideas? anyone want to tackle this? I can probably even host it.. --- court3nay habtm.com
I like the idea, but some of it would be very difficult to implement. For instance -- a lot of the ajax and form methods accept options that they don''t "know" about, and just pass them on as html attributes or JavaScript arguments, or something like that. It would be difficult to validate the options on those kinds of functions, and it would be difficult to decide which ones are validatable and which ones aren''t. As far as I know, there isn''t a consistent way that options are documented either -- it''s mostly just human-readable text in the rdoc comments. Of course, if you''re on a mac, you could just get the RDoc dashboard widget.. :] Tyler On 7/7/05, Courtenay <court3nay-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I was just editing some legacy code in dreamweaver and had forgotten > the wealth of autocompletey goodness that it offers. > > Since we don''t have a good equivalent autocomplete, really, for rails, > here''s an idea, that I have no time to work on, but which would be a > great addition to the stable of apps out there: > > If we could hook into the rdoc output, or just spider > http://api.rubyonrails.org, and provide a simple (yub-nub) type > textbox with ajaxified autocomplete.. > > so you start typing > > [ has_m ] > > > and it drops down with the whole api for has_many, with your options.. > > .. > ... now, this wouldn''t be complete without my signature > feature-bleeding. here goes: > > - the dropdown allows you to select options and construct the whole > options hash which you can paste into the app (find :all, > :conditions.. etc > - you can optionally save these, send ''em around with a unique link > > - paste in some code to validate its options (a troubleshooter, > partially addressed with this http://dev.rubyonrails.org/ticket/1653) > > - hook into a wiki, or *the* wiki, http:/wiki.rubyonrails.org to show > wikified entries related to the method > > - generalize the whole thing, let anything that can be rdoc''ed, get autocomplete > > Any more ideas? anyone want to tackle this? I can probably even host it.. > > --- > court3nay > habtm.com > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
On 7/7/05, Tyler Kiley <tyler.kiley-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I like the idea, but some of it would be very difficult to implement. > For instance -- a lot of the ajax and form methods accept options that > they don''t "know" about, and just pass them on as html attributes or > JavaScript arguments, or something like that. It would be difficult > to validate the options on those kinds of functions, and it would be > difficult to decide which ones are validatable and which ones aren''t.that''s true, but there''s always, human-edited. there''s not *that* much source code to go through.. :D i''d do it myself for the stuff i use all the time.> As far as I know, there isn''t a consistent way that options are > documented either -- it''s mostly just human-readable text in the rdoc > comments.yeah, i''m aware of that. but generally the options are given like a list of symbols. maybe a reformatting of the rdoc would be also required :)> Of course, if you''re on a mac, you could just get the RDoc dashboard widget.. :] > > Tyler > > On 7/7/05, Courtenay <court3nay-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I was just editing some legacy code in dreamweaver and had forgotten > > the wealth of autocompletey goodness that it offers. > > > > Since we don''t have a good equivalent autocomplete, really, for rails, > > here''s an idea, that I have no time to work on, but which would be a > > great addition to the stable of apps out there: > > > > If we could hook into the rdoc output, or just spider > > http://api.rubyonrails.org, and provide a simple (yub-nub) type > > textbox with ajaxified autocomplete.. > > > > so you start typing > > > > [ has_m ] > > > > > > and it drops down with the whole api for has_many, with your options.. > > > > .. > > ... now, this wouldn''t be complete without my signature > > feature-bleeding. here goes: > > > > - the dropdown allows you to select options and construct the whole > > options hash which you can paste into the app (find :all, > > :conditions.. etc > > - you can optionally save these, send ''em around with a unique link > > > > - paste in some code to validate its options (a troubleshooter, > > partially addressed with this http://dev.rubyonrails.org/ticket/1653) > > > > - hook into a wiki, or *the* wiki, http:/wiki.rubyonrails.org to show > > wikified entries related to the method > > > > - generalize the whole thing, let anything that can be rdoc''ed, get autocomplete > > > > Any more ideas? anyone want to tackle this? I can probably even host it.. > > > > --- > > court3nay > > habtm.com > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > >