Module: Warped::Controllers::Tabulatable::Ui
- Extended by:
- ActiveSupport::Concern
- Includes:
- Filterable::Ui, Pageable::Ui, Searchable::Ui, Sortable::Ui, Warped::Controllers::Tabulatable
- Defined in:
- lib/warped/controllers/tabulatable/ui.rb
Instance Method Summary collapse
-
#tabulate_query(**options) ⇒ String
The tabulation query string.
-
#tabulate_url_params(**options) ⇒ Hash
The tabulation url_params.
- #tabulation ⇒ Hash
Methods included from Sortable::Ui
#sort, #sort_url_params, #sortable_field?, #sorted?, #sorted_field?
Methods included from Sortable
#current_action_sort_value, #sort
Methods included from Searchable::Ui
#search, #search_url_params, #searched?
Methods included from Searchable
#model_search_scope, #search, #search_param, #search_term
Methods included from Pageable::Ui
#paginate, #paginate_url_params, #paginated?, #pagination
Methods included from Pageable
#page, #paginate, #pagination, #per_page
Methods included from Filterable::Ui
#filter, #filter_url_params, #filtered?
Methods included from Filterable
#current_action_filter_values, #current_action_filters, #filter, #parse_filter_params
Methods included from Warped::Controllers::Tabulatable
Instance Method Details
#tabulate_query(**options) ⇒ String
Returns The tabulation query string.
48 49 50 |
# File 'lib/warped/controllers/tabulatable/ui.rb', line 48 def tabulate_query(**) tabulate_url_params(**).to_query end |
#tabulate_url_params(**options) ⇒ Hash
Returns The tabulation url_params.
36 37 38 39 40 41 42 43 44 |
# File 'lib/warped/controllers/tabulatable/ui.rb', line 36 def tabulate_url_params(**) base = paginate_url_params base.merge!(search_url_params) base.merge!(sort_url_params) base.merge!(filter_url_params) base.merge!() base.tap(&:compact_blank!) end |
#tabulation ⇒ Hash
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/warped/controllers/tabulatable/ui.rb', line 22 def tabulation { filters:, current_filters:, sorts:, current_sorts:, search_term:, search_param:, pagination: } end |