Nathan's got it. I always feel elitist when I say this, but here goes: needing to wrap a haml line is generally a code smell.

In addition to creating a well-named helper, you may want to look at reducing the number of instance variables passed to your view. Without knowing your application logic at all, it seems like you should be able to combine @users and @roles_array. Just a suggestion.

:brad

Brevity disclaimer: Sent from my iPhone
---
bradley grzesiak
co-founder, bendyworks llc

On Feb 27, 2010, at 18:12, Nathan Weizenbaum <[email protected]> wrote:

The best solution is to move this into a well-named helper method and call that from your template.

On Sat, Feb 27, 2010 at 2:56 PM, Bharat <[email protected]> wrote:
Please take a look at the following line of HAML code (it works):

= render :partial => 'shared/crud_maint_table', :object =>
@users, :locals => {:controller_name => 'users', :columns =>
['id','username','email','active'], :search_fields_array =>
@search_fields_array, :status_array => @role_array, :actions =>
'user_actions'}

Someone with more experience in HAML, please advise on how to break it
up into multiple lines using "|" character (or something better) so
that it is readable?

Thanks.

Bharat

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


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

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