Sha256: 8253c805a3f1b44181b9ade173410e8fc9d57a7c151c38e87f661b5ae82717ce
Contents?: true
Size: 470 Bytes
Versions: 10
Compression:
Stored size: 470 Bytes
Contents
class UsersController < ApplicationController before_action :set_user, only: [:show] # GET /users def index render json: { users: User.all } end # GET /users/:id def show render json: @user end # GET /users/find def find render json: User.find_by_email!(params[:email]) end private # Use callbacks to share common setup or constraints between actions. def set_user @user = User.find(params[:id]) end end
Version data entries
10 entries across 10 versions & 1 rubygems