Sha256: e4a81fdf7b0d9ce7608ed6079a18f4c7ba159db06c16e1f153d551f97b598f50

Contents?: true

Size: 508 Bytes

Versions: 6

Compression:

Stored size: 508 Bytes

Contents

class OrdersController < ApplicationController

  def index
  end

  def example1
    @datatable = Example1
    respond_to do |format|
      format.html 
      format.js { render :json => @datatable.query(params).to_json }
    end
  end

  def example2
    @datatable = Example2
    @datatable.relation = Order.select([:order_number, :memo]).where(["memo like ?", 'red'])
    respond_to do |format|
      format.html 
      format.js { render :json => @datatable.query(params).to_json }
    end
  end

end


Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
datatable-0.2pre6 example_app/app/controllers/orders_controller.rb
datatable-0.2pre5 example_app/app/controllers/orders_controller.rb
datatable-0.2pre4 example_app/app/controllers/orders_controller.rb
datatable-0.2pre3 example_app/app/controllers/orders_controller.rb
datatable-0.2pre2 example_app/app/controllers/orders_controller.rb
datatable-0.2pre1 example_app/app/controllers/orders_controller.rb