Sha256: 8821b869657518ad71c2bb681cd59211ca4d4d17f9b3d25f05149b1fb796c645

Contents?: true

Size: 944 Bytes

Versions: 3

Compression:

Stored size: 944 Bytes

Contents

class DatatableCondStartWith < ComplexDatatable
  def view_columns
    super.deep_merge(first_name: { cond: :start_with })
  end
end

class DatatableCondEndWith < ComplexDatatable
  def view_columns
    super.deep_merge(last_name: { cond: :end_with })
  end
end

class DatatableCondLike < ComplexDatatable
  def view_columns
    super.deep_merge(email: { cond: :like })
  end
end

class DatatableCondStringEq < ComplexDatatable
  def view_columns
    super.deep_merge(email: { cond: :string_eq })
  end
end

class DatatableCondStringIn < ComplexDatatable
  def view_columns
    super.deep_merge(email: { cond: :string_in, formatter: -> (o) { o.split("|") } })
  end
end

class DatatableCondNullValue < ComplexDatatable
  def view_columns
    super.deep_merge(email: { cond: :null_value })
  end
end

class DatatableWithFormater < ComplexDatatable
  def view_columns
    super.deep_merge(last_name: { formatter: -> (o) { o.upcase } })
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ajax-datatables-rails-1.3.0 spec/support/datatables/datatable_cond_string.rb
ajax-datatables-rails-1.2.0 spec/support/datatable_cond_string.rb
ajax-datatables-rails-1.1.0 spec/support/datatable_cond_string.rb