On Tue, Oct 18, 2011 at 5:05 PM, genterminl
<[email protected]> wrote:
> This is a problem I am also facing - trying to set up a rails app with
> a legacy database.  The minimal model file Colin suggests works fine
> for access to the database, but I would love it if the scaffold (view,
> controller, ...) files could be generated as if all the table fields
> were explicitly used in the generate scaffold command.  I know I would
> still need to modify them, but I would rather not have to add all the
> fields for all the tables into the various view files.  I have found
> Dr. Nic's magic_model_generator gem, and if I can get it to do what I
> need with rails 2, which I am still not clear about, then I'll have to
> see if I can modify it to work with rails 3.  Can anybody suggest
> anything else that will generate a more complete (as in using the
> fields from the database) set of view and other files?

Can you just get a list of the columns in that table, then generate
the scaffold normally, using those fields as the parameters to the
call, then delete the migration file?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to