lib/query_helper.rb in query_helper-0.2.21 vs lib/query_helper.rb in query_helper-0.2.26
- old
+ new
@@ -65,10 +65,11 @@
preload: [],
search_fields: nil,
sql_filter: nil,
sql_sort: nil,
sort_tiebreak: nil,
+ column_sort_order: nil,
page: nil,
per_page: nil,
search_string: nil,
metadata: nil
)
@@ -83,9 +84,10 @@
@preload = preload if preload
@search_fields = search_fields if search_fields
@sql_filter = sql_filter if sql_filter
@sql_sort = sql_sort if sql_sort
@sql_sort.sort_tiebreak = sort_tiebreak if sort_tiebreak
+ @sql_sort.column_sort_order = column_sort_order if column_sort_order
@search_string = search_string if search_string
@page = determine_page(page: page, per_page: per_page) if page
@per_page = determine_per_page(page: page, per_page: per_page) if per_page
@metadata = metadata if metadata
set_limit_and_offset()