I have some embedded tables that form different sections of a view. I
find that I use the same look for certain ones which means I have to
duplicate the same exact table for each section that’s similar.
Is there a way to do… hmm… well… kind of like what a layout does
using @content_for_layout, but for a partial. Does that make any sense
OK so here’s some pseudocode of maybe a helper or something…
<% view_admin_block “Admin Title” %>
This is some content that would go in that block like links to
changing usernames, etc.
<% end %>
What this would do is render a table with all the fancy look-n-feel,
borders, all the things that it needs, and it would place “User
Administration” in the cell it should go in, and all the content in
another one. So something like…
|<%= the_title %>|
|<%= @content_for_partial %>|
This is a very simplistic example, but my tables are fairly complex with
spacers, different classes, styles, etc.
I bring this up because I just noticed that one of my table designs
didnt render correctly in IE (big shocker right?). So I have to go
through every single partial that uses that same look and fix it to work