Skip to content

Commit

Permalink
Add instructions about HAML and correct lazy language [jgdavey#21, jg…
Browse files Browse the repository at this point in the history
  • Loading branch information
jesjos committed Mar 21, 2013
1 parent 94740f7 commit a3fea06
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ will product html like:
</tbody>
</table>

For that last extra squeeze of micro-management, you can pass in a block to customize row classes with a block:
For that last extra squeeze of micro-management, you can pass in a block to customize row classes:
<%= table_for(@posts) do |t|
t.row_class { |post| post.title }
end %>
Expand All @@ -261,6 +261,12 @@ You can also choose to omit the odd and even classes:
end
end %>

In HAML you would have to use a dash instead of an equals sign:

= table_for(@posts) do |t|
- t.row_class("foo")
= t.data


If it _still_ isn't flexible enough for your needs, it might be time to return to static html/erb.

Expand Down

0 comments on commit a3fea06

Please sign in to comment.