Rework how columns are declared
Closed this issue · 1 comments
antillas21 commented
Recently a decision was made to add support for empty arrays in the sortable_columns
and searchable_columns
methods, as proposed here: #81
But it has been brought up recently through this issue: #83 that perhaps a better approach to how columns are declared is the best thing to do.
Proposed behavior:
- replace
sortable_columns
andsearchable_columns
methods with only one method namedview_columns
which will hold the same columns displayed in the html view, but expressed inModelName.column_name
,AliasedJoinTableName.column_name
notation. - then the gem should identify the corresponding column to sort by or search on based on the sortable and searchable properties for each column coming through the view params.
antillas21 commented
Completed.