Forum: Ruby on Rails newbie scaffold question

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A393d0639e9c313bcee804a12303b9e5?d=identicon&s=25 Gaudi Mi (gaudimila)
on 2006-03-03 01:21
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
58c44a4a506d878f9a112f1d7b7cb87e?d=identicon&s=25 Jeremy Evans (Guest)
on 2006-03-03 01:39
(Received via mailing list)
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/Scaffoldin...
A393d0639e9c313bcee804a12303b9e5?d=identicon&s=25 Gaudi Mi (gaudimila)
on 2006-03-03 03:53
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/Scaffoldin...
This topic is locked and can not be replied to.