OK, sounds good. I actually prefer your way, as I have a %div[cat] and
then a form_for(cat) nested inside of it, so having both be #new_cat
would be bad.

Nick

On Apr 17, 1:49 am, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
> Added to trunk. I did it a slightly different way:
>
> id = "#{class_name}_#{ref.id || 'new'}"
>
> but the effect is the same: anything with a nil id will have "new" instead.
>
> - Nathan
>
> Nick Howell wrote:
> > buffer.rb:202
> > id = "#{class_name}_#{ref.id}"
>
> > Should that be something like this?
> > id = ref.respond_to?(:new_record?) && ref.new_record? ?
> > "new_#{class_name}" : "#{class_name}_#{ref.id}"
>
> > Then, presumably, this:
>
> > %form[x]= "Cats!"
>
> > would produce:
> > <form id="new_cat">Cats!</form>
> > or
> > <form id="cat_3">Cats!</form>
>
> > when x is a cat (depending on whether it had been stored or not),
> > which seems more in-line with form_for (it was definitely what I had
> > expected).
>
> > Nick


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" 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/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to