Sha256: 93ed05e2dd9e068a7fa92bab5e84eef1c58acd1ddc2c40f6df0627b9474ca687

Contents?: true

Size: 524 Bytes

Versions: 3

Compression:

Stored size: 524 Bytes

Contents

require_relative 'rails_serverside_datatables/column'
require_relative 'rails_serverside_datatables/expression_functions'
require_relative 'rails_serverside_datatables/data_table'

require_relative 'rails_serverside_datatables/views/railtie' if defined?( Rails )

module RailsServersideDatatables
  def datatable( column_definitions, query, parameters = nil )

    table = DataTable.new( query, parameters || params )
    column_definitions.each { |column| table.add_column column }

    render json: table.as_json
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rails_serverside_datatables-0.1.3 lib/rails_serverside_datatables.rb
rails_serverside_datatables-0.1.2 lib/rails_serverside_datatables.rb
rails_serverside_datatables-0.1.1 lib/rails_serverside_datatables.rb