Closed awh-tokyo closed 8 years ago
I'd like checkboxes in the filters that don't actually change the filter scope, but that allow the view to selectively display columns.
I think that the first step is to make a scope
scope :display_name, -> { all }
But is there any way that my view can know that the "display_name" scope is selected so it can display the name column?
Never mind, turns out that it's really easy:
In the model:
scope :display_name, ->(show) { all }
And in the view:
- if @filterrific.display_name %td= name
I'd like checkboxes in the filters that don't actually change the filter scope, but that allow the view to selectively display columns.
I think that the first step is to make a scope
But is there any way that my view can know that the "display_name" scope is selected so it can display the name column?