table_header should not render the itself, but it should render a span, letting the developers render the TH themselves.
%th= table_header "Name", :name
Because:
- it works better with other plugins, like my model_based_html plugin
- if you want to display an image to show which way it is sorted (as background image), you cannot have a background image for the TH anymore.
Speaking of which: the class should be reversed. When the link points to sorting the column ascending, the class should represent the way it's sorted at this moment.
table_header should not render the itself, but it should render a span, letting the developers render the TH themselves.
%th= table_header "Name", :name
Because:
Speaking of which: the class should be reversed. When the link points to sorting the column ascending, the class should represent the way it's sorted at this moment.