tab/app/controllers/datatables_controller.rb

10 lines
228 B
Ruby
Raw Normal View History

class DatatablesController < ApplicationController
respond_to :json
def transactions_for_user
2018-08-07 20:13:23 +02:00
user = User.find_by(name: params[:id])
datatable = DataTable.new(user, params)
render json: datatable.json
end
end