Mr Mapes wrote in post #613756: > Ryan Bigg wrote: >> New way is to specify the fields. >> >> script/generate scaffold person first_name:string last_name:string >> > > I'm considering Ruby on Rails, but I already have a big database schema, > and I'd rather not re-type firstname:string lastname:string, for the > dozens of fields in my dozens of tables. Is there some way for Ruby to > build the scaffold based on what it finds in the existing database? > Wasn't that the whole point in previous versions? This seems like a big > step backwards....
Probably to late for Ryan Bigg problem, but there is a cool gem called schema_to_scaffold to generate a scaffold script. it outputs: rails g scaffold users fname:string lname:string bdate:date email:string encrypted_password:string from your schema.rb our your renamed schema.rb. Check [here][1] [1]: https://rubygems.org/gems/schema_to_scaffold -- Posted via http://www.ruby-forum.com/. -- 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 https://groups.google.com/groups/opt_out.

