Watched 1 video

Watched 1 Video from start to finish

Subscribed for 1 month

Learning and showing your support for 1 Month

Spread the word 1 time

Referred 1 Member to Drifting Ruby

10

10 times Chatter Box

Make 10 comments to videos or replies to other comments
4/10

10

Share the love 10 times

Liked 10 episodes
9/10

3

Welcome back 3 times

You've visited Drifting Ruby on 3 different days

2

Suggested 2 episodes

Helped the community by suggesting 2 episodes
1/2

8

Vote Suggestion 8 times

Helped the community by voting on suggestions 8 times
6/8

4

Vote Suggestion 4 times

Helped the community by voting on suggestions 4 times

Earned on 3/6/2019

2

Vote Suggestion 2 times

Helped the community by voting on suggestions 2 times

Earned on 3/6/2019

Vote Suggestion 1 time

Helped the community by voting on suggestions 1 time

Earned on 3/6/2019

Suggested 1 episode

Helped the community by suggesting 1 episode

Earned on 3/6/2019

Share the love 1 time

Liked 1 episode

Earned on 3/4/2019

1 time Chatter Box

Make 1 comment to videos or replies to other comments

Earned on 3/4/2019

Patrício dos Santos said over 2 years ago on Rails API - Authentication with JWT :

If you prefer, you can use Postman too: https://www.getpostman.com/

Patrício dos Santos said over 2 years ago on Rails API - Authentication with JWT :

First thanks for this video. Helps a lot. 

But I am having a trouble implementing this like.

I have the following Routes:

Rails.application.routes.draw do
    namespace :api, constraints: { subdomain: 'api' }, path: '/' do
        namespace :v1 do
            post 'user_token' => 'user_token#create'
        end
    end
end

With this code, I expect to be able to make a POST request like: POST http://api.domain.com/v1/user_token

But when I try to that, I receive an error: NameError: uninitialized constant API::V1::User

It seams like, its looking for the model `User` on the same namespace. But my model User is not namespaced:

class User < ApplicationRecord
    has_secure_password
end

How can I make it work? What I am missing?

Thanks

Patrício dos Santos said over 2 years ago on Rails API - Authentication with JWT :

I think I found a temporary fix :  https://github.com/nsarno/knock/issues/120

Patrício dos Santos said over 1 year ago on Basic Testing Introduction in Rails :

Congratulations for the 100th video \o/