Sha256: 51bd36e29b921a1b5f839559ca236e819dc80cebdc906690eabb1bd3e4c413e9
Contents?: true
Size: 323 Bytes
Versions: 37
Compression:
Stored size: 323 Bytes
Contents
class DemoController < ApplicationController def members_only if @user render json: { data: { message: "Welcome #{@user.name}", user: @user } }, status: 200 else render json: { errors: ["Authorized users only."] }, status: 401 end end end
Version data entries
37 entries across 37 versions & 1 rubygems