Scaffolding in the Controller (:scaffold) looks at the DB tables on
the fly and constructs the index, show and edit forms based on the
columns found. If you generate the scaffolding code (./script/
generate scaffold) it writes the current information into the files
within the project, so any updates to the DB will not be reflected.
At least that''s my recollection. You quickly out grow
scaffolding.....
Andrew
On Jul 17, 10:22 pm, Max Williams
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:> I have a problem with a new rails program i''ve just started.
>
> I have a list page for my DB table, and all the CRUD stuff is working
> fine, except that the ''new'' and ''edit''
pages don''t have all the form
> components they should have: my db table has fields "id, title, url,
> added_at", and these are all listed on the list page. However, the
> ''new'' has only a text field for title, and nothing for
"url".
>
> When i''ve done this before (just with tutorials, i''m a
rails noob), a
> change to the DB was instantly reflected in the ''new''
page, ie the
> "_form.rhtml" page was automatically modified. This
isn''t happening now
> though. Does anyone know why?
>
> thanks
>
> By the way, i just checked and if i re-generate the scaffold then the
> right boxes appear. I shouldn''t have to do this though should i?
When
> i worked through the tutorial (DHH''s weblog movie) then DB changes
were
> represented instantly in the form.
>
> --
> Posted viahttp://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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---