lib/query_helper.rb in query_helper-0.2.19 vs lib/query_helper.rb in query_helper-0.2.20
- old
+ new
@@ -64,10 +64,11 @@
custom_mappings: nil,
preload: [],
search_fields: nil,
sql_filter: nil,
sql_sort: nil,
+ sort_tiebreak: nil,
page: nil,
per_page: nil,
search_string: nil,
metadata: nil
)
@@ -81,9 +82,10 @@
@custom_mappings = custom_mappings if custom_mappings
@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
@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()