We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2f1eb9e + 5e486f5 commit ea8ef44Copy full SHA for ea8ef44
lib/ajax-datatables-rails/base.rb
@@ -74,7 +74,7 @@ def fetch_records
74
75
def sort_records(records)
76
sort_by = []
77
- params[:order].each_value do |item|
+ params[:order].each_pair do |_, item|
78
sort_by << "#{sort_column(item)} #{sort_direction(item)}"
79
end
80
records.order(sort_by.join(", "))
@@ -194,7 +194,7 @@ def sortable_displayed_columns
194
195
def generate_sortable_displayed_columns
196
@sortable_displayed_columns = []
197
- params[:columns].each_value do |column|
+ params[:columns].each_pair do |_, column|
198
@sortable_displayed_columns << column[:data] if column[:orderable] == 'true'
199
200
@sortable_displayed_columns
0 commit comments