OK, so my previous errors seemed to be due to a Windows environment
issue.  Now I'm back on my Mac things are all working.
Anyway....thanks for the help and pointing in the direction of those
screencasts.  I found Ryan's updated nested form example on Github
(complex-form-examples) and it's just what I was looking for.
However, I do have a further question regarding table id's.

In my application I have a recipe with multiple steps.  Using the
complex form example, I can create, edit and delete the steps of a
recipe.  However, the step id's are always incrementing.  I.E.  I
create two steps which have id's of 1 and 2 respectively.  If I now
delete the second step and add another I now have id's 1 and 3.  id 2
has been 'consumed' which means that a simple loop using the id's to
generate an html list won't work.

Is this just the way table id's work when they are deleted or is it
specific to this implementation in the complex form example?  Is the
solution to work out how many steps are present and increment an
integer to use as the index in the template?

Thanks.

On Dec 29 2009, 8:38 pm, Ooh_Gravy <[email protected]> wrote:
> So I've been reading just that blog entry but can't get it to work.
> I've create a "recipes" table with name, author and a description.
> ...

--

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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to