Sha256: c32ca6a5c23db81a3b102ad8f9056c87b81430ba51ad664b35dd027ccfc14f6b
Contents?: true
Size: 523 Bytes
Versions: 36
Compression:
Stored size: 523 Bytes
Contents
# frozen_string_literal: true class DemoUserController < ApplicationController before_action :authenticate_user! def members_only render json: { data: { message: "Welcome #{current_user.name}", user: current_user } }, status: 200 end def members_only_remove_token u = User.find(current_user.id) u.tokens = {} u.save! render json: { data: { message: "Welcome #{current_user.name}", user: current_user } }, status: 200 end end
Version data entries
36 entries across 36 versions & 9 rubygems