Sha256: 518824e63c96c609fc8ec7f7cfd0685c2bb3cbb3d19bb90100c73dd259fa9099

Contents?: true

Size: 492 Bytes

Versions: 8

Compression:

Stored size: 492 Bytes

Contents

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

8 entries across 8 versions & 2 rubygems

Version Path
devise_token_auth-0.1.43 test/dummy/app/controllers/demo_user_controller.rb
digix_devise_token_auth-0.1.44 test/dummy/app/controllers/demo_user_controller.rb
devise_token_auth-0.1.43.beta1 test/dummy/app/controllers/demo_user_controller.rb
devise_token_auth-0.1.42 test/dummy/app/controllers/demo_user_controller.rb
devise_token_auth-0.1.41 test/dummy/app/controllers/demo_user_controller.rb
devise_token_auth-0.1.40 test/dummy/app/controllers/demo_user_controller.rb
devise_token_auth-0.1.39 test/dummy/app/controllers/demo_user_controller.rb
devise_token_auth-0.1.38 test/dummy/app/controllers/demo_user_controller.rb