tab/app/controllers/users_controller.rb

21 lines
478 B
Ruby
Raw Normal View History

2015-09-08 15:14:46 +02:00
class UsersController < ApplicationController
skip_before_filter :verify_authenticity_token, only: :create
before_action :authenticate_user!, except: :show
before_action :authenticate_user_or_client!, only: :show
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|
format.html { @transaction = Transaction.new }
format.json { render json: @user }
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