Any time that *any* line with *anything* written on it violates the
indentation opened by a parent line, that line is closed.

Your silent-script line (the -) is flush with the right hand side, so
the parent closes itself to make room for the - to function at the
same level.

Indent the whole - line in one.

%table
  - for order in @orders
   %tr
     %td= link_to 'Show', order_path(order)
     %td= link_to 'Edit', edit_order_path(order)
     %td= link_to 'Destroy', order_path(order), :confirm => 'Are you
sure?', :method => :delete

Don't worry, when the results come, the <tr> will only be in by one
from the <table>... that's why the - is silent. However, for building
the logic, it still needs to be "inside" the %table.

-hampton.

On 1/28/07, shaners  o matic 8000 <[EMAIL PROTECTED]> wrote:
>
> again i was converting one of the scaffold_resource views and got an
> unexpected result and can't figure it out.
>
> %table
> - for order in @orders
>   %tr
>     %td= link_to 'Show', order_path(order)
>     %td= link_to 'Edit', edit_order_path(order)
>     %td= link_to 'Destroy', order_path(order), :confirm => 'Are you
> sure?', :method => :delete
>
> this is what i get.
>
> <table>
> </table>
> <tr>
>   <td><a href="/orders/1">Show</a></td>
>   <td><a href="/orders/1;edit">Edit</a></td>
>   <td><a href="/orders/1" ///trimmed for post...///</a></td>
> </tr>
>
> obviously i want the table to close AFTER the tr. what am i doing
> wrong?
>
> thanks
> sb
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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