I''ve got a database with several tables. I''d like to create scaffolding for separate CRUD interfaces for several of these tables. I''m hoping that the scaffold generator can create the CRUD code for all these tables in ONE controller, but I don''t know how to tell it to do that, if it can. Can anyone verify if this is possible? Thanks, David -- Posted via http://www.ruby-forum.com/.
On 3/2/06, Gaudi Mi <gaudimila@yahoo.com> wrote:> I''ve got a database with several tables. I''d like to create scaffolding > for separate CRUD interfaces for several of these tables. I''m hoping > that the scaffold generator can create the CRUD code for all these > tables in ONE controller, but I don''t know how to tell it to do that, if > it can. > > Can anyone verify if this is possible?I''m not sure if you can do it with the generator (I don''t think so), but you can use the scaffold method with the :suffix option if you don''t need to modify the dynamically generated scaffold. BTW, you might want to look into the Scaffolding Extensions plugin [1]. [1] http://wiki.rubyonrails.com/rails/pages/Scaffolding+Extensions+Plugin
Thanks, Jeremy. I didn''t know about the scaffold method. Very helpful. I imagine I''ll dump scaffolding later on, but it sure helps in the learning curve days. Jeremy Evans wrote:> On 3/2/06, Gaudi Mi <gaudimila@yahoo.com> wrote: >> I''ve got a database with several tables. I''d like to create scaffolding >> for separate CRUD interfaces for several of these tables. I''m hoping >> that the scaffold generator can create the CRUD code for all these >> tables in ONE controller, but I don''t know how to tell it to do that, if >> it can. >> >> Can anyone verify if this is possible? > > I''m not sure if you can do it with the generator (I don''t think so), > but you can use the scaffold method with the :suffix option if you > don''t need to modify the dynamically generated scaffold. BTW, you > might want to look into the Scaffolding Extensions plugin [1]. > > [1] > http://wiki.rubyonrails.com/rails/pages/Scaffolding+Extensions+Plugin-- Posted via http://www.ruby-forum.com/.