I need to add a column to a table in Spree's Admin backend. There is a data-hook on each <tr>.
So in theory I can insert_top a <td> on each row (and also insert a <th> in the <thead> and a <col> in the <colgroup>).
Is this the best way, or is there a better way?
This is fairly easy to achieve using a few small files with the new .deface DSL. Eg with HAML (assuming Spree::Order has a custom attribute called distributor)
Header:
Rows:
If you want to alter the column widths, it's often easier just to overwrite the colgroup: