Alternate Class for rows of Table

  %tr class="<%=  cycle('list_line_odd', 'list_line_even') %>"

The Rails helper method called cycle() does this by setting the CSS class of each row
to either list_line_even or list_line_odd, automatically toggling between the two
style names on successive lines.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s