How's this?

%tr
   - for @user in users
     %td= in_place_editor_field :user, :l_name

You'll find this pattern handy for file_column as well. I wonder if  
this is doing what you want it to, though. You'll have one row and a  
column for each user. Is that what you intended?

Steve

On Feb 5, 2007, at 4:42 PM, Yitzhak Bar Geva wrote:

>
> Thanks. After some playing with it, I advanced, but still stuck.
>
> = javascript_include_tag :defaults
> %h1 Listing users
>
> %table{:cellpadding => 5, :bgcolor => "#FFFF66", :border => 5}
>   %tr
>     %th first name
>     %th last name
>     %th Phone
>     %th Contacts sum
>     %th Comments
>   %tr
>     - for user in users
>       -  @user = user
>       %td={ in_place_editor_field :user, :l_name }
>
> / = link_to 'New user', new_user_path
>
> Gives me these errors:
>  SyntaxError in Users#index
>
> Showing app/views/users/index.haml where line #14 raised:
>
> (eval):55:in `compile': compile error
> (eval):46: syntax error, unexpected tSYMBEG, expecting kDO or '{'  
> or '('
> haml_temp = { in_place_editor_field :user, :l_name }
>                                      ^
>
> Extracted source (around line #14):
>
> 11:   %tr
> 12:     - for user in users
> 13:       -  @user = user
> 14:       %td={ in_place_editor_field :user, :l_name }
> 15:
> 16: / = link_to 'New user', new_user_path
>
>
>
>
> >


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