What does everyone on this list think about enhancing scaffolding somehow so that a "has_many" relationship will automatically drop the <select> box into the view to reference the "belongs_to" part of the view? I think scaffolding is great but I am always adding the <select> boxes to reference the parent association. Do you think this would be useful? just a thought for enhancing an already powerful rails. adam
On 1/26/06, Adam Denenberg <straightflush@gmail.com> wrote:> What does everyone on this list think about enhancing scaffolding > somehow so that a "has_many" relationship will automatically drop the > <select> box into the view to reference the "belongs_to" part of the > view? > > I think scaffolding is great but I am always adding the <select> boxes > to reference the parent association. Do you think this would be > useful? just a thought for enhancing an already powerful rails.See the Scaffolding Extensions plugin (http://wiki.rubyonrails.com/rails/pages/Scaffolding+Extensions+Plugin).
zbyte pepsi-hola
2006-Jan-27 06:38 UTC
[Rails] Scaffolding to use has_many and belongs_to ?
very nice, but i can only get it through svn? :( would be nice to see a gem for this. On 1/27/06, Jeremy Evans <jeremyevans0@gmail.com> wrote:> > On 1/26/06, Adam Denenberg <straightflush@gmail.com> wrote: > > What does everyone on this list think about enhancing scaffolding > > somehow so that a "has_many" relationship will automatically drop the > > <select> box into the view to reference the "belongs_to" part of the > > view? > > > > I think scaffolding is great but I am always adding the <select> boxes > > to reference the parent association. Do you think this would be > > useful? just a thought for enhancing an already powerful rails. > > See the Scaffolding Extensions plugin > (http://wiki.rubyonrails.com/rails/pages/Scaffolding+Extensions+Plugin). > _______________________________________________ > 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/20060127/91d75bab/attachment-0001.html
im a little confused. The views are already created so where are these magic select boxes supposed to be coming from? adam On 1/27/06, zbyte pepsi-hola <zbyte64@gmail.com> wrote:> very nice, but i can only get it through svn? :( would be nice to see a gem > for this. > > > On 1/27/06, Jeremy Evans < jeremyevans0@gmail.com> wrote: > > On 1/26/06, Adam Denenberg < straightflush@gmail.com> wrote: > > > What does everyone on this list think about enhancing scaffolding > > > somehow so that a "has_many" relationship will automatically drop the > > > <select> box into the view to reference the "belongs_to" part of the > > > view? > > > > > > I think scaffolding is great but I am always adding the <select> boxes > > > to reference the parent association. Do you think this would be > > > useful? just a thought for enhancing an already powerful rails. > > > > See the Scaffolding Extensions plugin > > > (http://wiki.rubyonrails.com/rails/pages/Scaffolding+Extensions+Plugin). > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >
On 1/27/06, Adam Denenberg <straightflush@gmail.com> wrote:> im a little confused. The views are already created so where are > these magic select boxes supposed to be coming from?The Scaffolding Extensions plugin modifies the Rails scaffold method, not the generator. It''s designed to replace the scaffold generator by allowing for common customization requirements without the redundancy implicit in code generation. In other words, you don''t generate the scaffold and then modify it, instead you add the necessary customization code to the model and then call the scaffold method in the controller.
could you provide an example of calling one of these in the controller? I couldnt find an example in the docs. thanks adam On 1/27/06, Jeremy Evans <jeremyevans0@gmail.com> wrote:> On 1/27/06, Adam Denenberg <straightflush@gmail.com> wrote: > > im a little confused. The views are already created so where are > > these magic select boxes supposed to be coming from? > > The Scaffolding Extensions plugin modifies the Rails scaffold method, > not the generator. It''s designed to replace the scaffold generator by > allowing for common customization requirements without the redundancy > implicit in code generation. In other words, you don''t generate the > scaffold and then modify it, instead you add the necessary > customization code to the model and then call the scaffold method in > the controller. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
On 1/27/06, Adam Denenberg <straightflush@gmail.com> wrote:> could you provide an example of calling one of these in the > controller? I couldnt find an example in the docs.I''m not sure which docs you looked at. See the wiki page (http://wiki.rubyonrails.com/rails/pages/Scaffolding+Extensions+Plugin) for explanations on usage.