8000 Coding style · jbox-web/ajax-datatables-rails@18c0b9e · GitHub
[go: up one dir, main page]

Skip to content

Commit 18c0b9e

Browse files
committed
Coding style
1 parent 5d40427 commit 18c0b9e

File tree

4 files changed

+5
-5
lines changed
  • support
  • 4 files changed

    +5
    -5
    lines changed

    lib/ajax-datatables-rails/datatable/column/order.rb

    Lines changed: 2 additions & 2 deletions
    Original file line numberDiff line numberDiff 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

    lib/ajax-datatables-rails/datatable/simple_order.rb

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff 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

    spec/ajax-datatables-rails/datatable/column_spec.rb

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -18,7 +18,7 @@
    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

    spec/support/test_helpers.rb

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -82,7 +82,7 @@ def get_raw_records
    8282
    User.all
    8383
    end
    8484
    end
    85-
    85+
    8686
    class ComplexDatatableArray < ComplexDatatable
    8787
    def data
    8888
    records.map do |record|

    0 commit comments

    Comments
     (0)
    0