2015-09-08 15:14:46 +02:00
|
|
|
class UsersController < ApplicationController
|
2015-09-08 17:40:40 +02:00
|
|
|
load_and_authorize_resource
|
|
|
|
|
2015-09-08 17:28:46 +02:00
|
|
|
def show
|
|
|
|
@user = User.find(params[:id])
|
2015-09-08 20:45:32 +02:00
|
|
|
respond_to do |format|
|
2015-09-11 13:16:53 +02:00
|
|
|
format.html do
|
|
|
|
@transaction = Transaction.new
|
|
|
|
end
|
2015-09-10 20:12:12 +02:00
|
|
|
format.json do
|
|
|
|
datatable = DataTable.new(@user, params)
|
|
|
|
render json: datatable.json
|
|
|
|
end
|
2015-09-08 20:45:32 +02:00
|
|
|
end
|
2015-09-08 17:28:46 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
def index
|
|
|
|
@users = User.all
|
|
|
|
end
|
2015-09-08 15:14:46 +02:00
|
|
|
end
|