Forum: Ruby on Rails newbie - how do I create an edit form without scaffold?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
farocco (Guest)
on 2005-12-10 17:47
(Received via mailing list)
Hello,

Can someone give me a short code example of how to code an edit form and
controlled?

Say I want to edit a title with a key of id

<form...what goes here


<controller>
def edit
... what goes here
end

thanks
Frank
technoweenie (Guest)
on 2005-12-10 17:51
(Received via mailing list)
On 12/10/05, Mr FRANK ROCCO <removed_email_address@domain.invalid> wrote:
>
> <controller>
> def edit
> ... what goes here
> end
>
> thanks
> Frank

Generate your scaffold with script/generate MyModel.  It will show you
an example of how to do this.


--
rick
http://techno-weenie.net
Bruce B. (Guest)
on 2005-12-10 18:16
(Received via mailing list)
Hi Frank:

I'd use the scaffolding to create the form there way and use that as
a reference to build my own and then delete the scaffolding produced
one.

bruce
farocco (Guest)
on 2005-12-10 23:14
(Received via mailing list)
ok, thanks

I just changed the cookbook edit.rhtml to use text_field and it works
fine.
I am using locomotive on mac.

I tried to change an app I coded at work on windows using radrails
and it would not run.

not sure what's going on.

Thanks again for your help.

Frank
This topic is locked and can not be replied to.