Kevin,
I''m under the impression that you misunderstood the point somewhat. I
am aware
of the scaffold function, thanx for that. What I''m looking for is, as
the
article link shows you can have one template for multiple actions. This works
for new/create and edit/update. The only difference is that a records exists
in the latter case. So only one form is needed, used by 4 methods.
Because I''m having multiple new methods. I''m trying to figure
out if it is
possible to have one form for the following methods.
new_company
new_contact
new_project
edit_company
edit_ ... etc
update_ ...
and
create_ ....
Because the comment in the article shows that in the template you then only
need "<%= auto_form %>" as a form start tag.
Regards,
Gerard.
On Monday 02 January 2006 17:26, Kevin Olbrich tried to type something
like:> The default scaffold generator uses a partial template called _form that
> holds all the form definition stuff that you see in the edit/create
> actions. It then generates a ''new'' and
''create'' template that wraps a
> form around that and links the correct actions to the submit.
>
> It''s simple, it''s easy, and it''s pretty DRY.
>
> If necessary you can modify the _form partial to change the layout
> depending on the calling action (use controller.action_name).
--
"Who cares if it doesn''t do anything? It was made with our new
Triple-Iso-Bifurcated-Krypton-Gate-MOS process ..."
My $Grtz =~ Gerard;
~
:wq!