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