My favorite new feature that I didn't know about:
Also, partials now take blocks, meaning they can act somewhat like layouts.
The partial itself can contain a yield:
<table> <tr><td> <%= yield %> </td></tr> </table>
Then the call to the partial can include a block:
<% render :partial => "table_partial" do %> <%= @project.name %> <% end %>
And the yield command invokes the block, as you would expect
Awesome!
0 comments:
Post a Comment