Re: Sharing code between the edit and create actions

Francisco Hernandez
Thu, 27 Jan 2005 00:56:13 -0000

I used Partials for this:

http://rails.rubyonrails.org/classes/ActionView/Partials.html

I have a _form.rhtml partial that gets used with edit/create actions

Bill Atkins wrote:
> Is there an easy way to reuse the code used to generate an edit form
> to generate the form for the create action?  In the ONLamp tutorial, a
> custom edit page is written, but the changes have no effect on
> creating a recipe.
>
> Bill
>