File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed
lib/ajax-datatables-rails/datatable
ajax-datatables-rails/datatable Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ def sort_query
1919 end
2020
2121 # Add option to sort null values last
22- def nulls_last
23- @view_column [ :nulls_last ] || ( @options [ :nulls_last ] == 'true' )
22+ def nulls_last?
23+ @view_column [ :nulls_last ] || @options [ :nulls_last ] == 'true'
2424 end
2525
2626 end
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ def column_direction
3838 end
3939
4040 def sort_nulls_last?
41- column . nulls_last == true || AjaxDatatablesRails . config . nulls_last == true
41+ column . nulls_last? || AjaxDatatablesRails . config . nulls_last == true
4242 end
4343
4444 end
Original file line number Diff line number Diff line change 1818 end
1919
2020 it 'should sort nulls last' do
21- expect ( column . nulls_last ) . to eq ( true )
21+ expect ( column . nulls_last? ) . to eq ( true )
2222 end
2323
2424 it 'should be searchable' do
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ def get_raw_records
8282 User . all
8383 end
8484end
85-
85+
8686class ComplexDatatableArray < ComplexDatatable
8787 def data
8888 records . map do |record |
You can’t perform that action at this time.
0 commit comments