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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedDec 6, '12 at 6:10p
activeDec 6, '12 at 6:10p
posts1
users1
websiterubyonrails.org
irc#RubyOnRails

1 user in discussion

Humberto P.: 1 post

People

Translate

site design / logo © 2021 Grokbase