File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
lib/ajax-datatables-rails/orm Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ Layout/EmptyLinesAroundModuleBody:
2626Layout/EmptyLineBetweenDefs :
2727 Enabled : false
2828
29+ Metrics/CyclomaticComplexity :
30+ Max : 7
31+
2932Metrics/LineLength :
3033 Enabled : false
3134
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ def filter_records(records)
1212 records . where ( build_conditions )
1313 end
1414
15+ # rubocop:disable Style/EachWithObject
1516 def sort_records ( records )
1617 sort_by = datatable . orders . inject ( [ ] ) do |queries , order |
1718 column = order . column
@@ -20,6 +21,7 @@ def sort_records(records)
2021 end
2122 records . order ( sort_by . join ( ', ' ) )
2223 end
24+ # rubocop:enable Style/EachWithObject
2325
2426 def paginate_records ( records )
2527 records . offset ( datatable . offset ) . limit ( datatable . per_page )
You can’t perform that action at this time.
0 commit comments