i’ve tried this on three macs (tiger, panther, etc)… and my ROR is up
to date on each.
My models and controllers aren’t displaying all my mysql db fields.
When I run script/generate scaffold Planner … it builds the
controller, model, and all the rest.
When I go to test the app and new controller, now called planners no
content is listed… and all I ever get is the submit button, and
‘SHOW’, ‘EDIT’ links. I get none of the form to work with, just the
form button.
I noticed that the Views for the controller planners has all
*.html.erb extensions… .i changed them to .rhtml extensions, but
nothing changes.
the more i’m reading here… it looks like scaffold is not built in…
even
though going the generate does create the views, just not a complete
CRUD.
I don’t really care about the CRUD… just the rapid generation of views.
Scaffolding is still built-in, but it won’t look for existing tables
when it builds the views. You’ve got to list out all your
column_name:column_type pairs on the call to script/generate.
you’ll get the part that makes new and edit forms. I extracted this from
Rails 1.x and made it work for current Rails cos while I hate
scaffolding,
I hate making forms by hand even more.
Yes… cool. I did a little digging and found out ‘how’ to do it now.
Truthfully, I like the old way for rapid CRUD of existing data (for
internal
apps and those not necessarily for primetime); but noobs can’t always
get
what they want – usually something easy.
I’m definitely a noob.
But thanks all for the good advice.
Spud
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.