<% = link_to "Login with Google account", "/ users/auth/google_oauth2/callback", method:: post%>
I wrote like this
Rails.application.routes.draw do root to:'drinks # index' get'/ login', to:'sessions # new' post'/ users/auth /: provider/callback', to:'sessions # create'
Is described as
No route matches [GET] "/ users/auth/google_oauth2/callback"
And get request is accepted
Even with the verification tool, the generated a link did not have method = post.What I tried
Login with Google Account
I could do it.
Why doesn't link_to work?
Answer # 1
It's strange ...
Maybe this is the reason.
Because it means
Why don't you check it out?
// = require jquery_ujs
It seems that the same phenomenon will occur if there is no description.
I confirmed github.
I'm sorry, rails6 seems to have a different directory structure for the app ...
The correspondence method in case of 6 seems to be different ...
I can't say anything because I've never built an app in 6, but it's probably the location of the file.Further notes
I saw the commit history on github.
Delete unnecessary description
Is deleted at the time of commit
jquery-ujsI remember that it had the same effect as.
As a test,
rails-ujsWhy don't you put it back (restored)?
- ruby - where method doesn't work
- ruby on rails undefinde method doesn't work
- ruby - i'm using the errors method, but i don't get an error message
- ruby on rails - rails doesn't work
- ruby - i've separated the methods, but it doesn't work nomethoderror (undefined method `+'for nil: nilclass)
- ruby - undefined method `save'for nil: nilclass cannot be resolved
- ruby - i want to insert an image_tag inside link_to
- ruby on rails: undefined method ʻuser'for nil: about nomethoderror of nilclass
- ruby - the last db setting doesn't work when deploying rails app on aws
- ruby - no method error rails
- [ruby] "attr_accessor" i don't understand this method
- ruby on rails 5 - time calculation doesn't work
- ruby - binary data conversion method
- ruby on rails - launching unicorn doesn't work
- ruby bundler doesn't work no error message is displayed
- ruby - "the page you were looking for doesn't exist" when deploying rails 6
- ruby - [rails] i want to change the argument of link_to using conditional branching
- ruby - improvement of nomethoderror undefined method `paginate'
- ruby - nomethoderror: undefined method `new'for: uglifier: symbol error on heroku deployment
- ruby - i want to be able to see "liked posts" by the person on the rails development user detail page
- ruby - about viewport introduction
- ruby - about customizing pagination with rails6 kaminari
- ruby - i want to display new posts i made on the top page only for myself
- ruby - nomethoderror at post time with tag function implementation
- ruby - rails6 active_strage cannot be installed
- ruby - data including rails hyphen becomes # and is not displayed
- ruby - i don't feel that the sql issued by rails has a different format from the sql that i usually write
- html - about boot strap free introduction
- ruby - [rails6] i get an error on heroku when i write