there is a possibility that You have to make a custom_redirection.rb in which you have to handle the routes. You can take help from https://railsforum.com/topic/889-trick-devise-gem-custom-redirect-for-failed-login/ Hope this may help you!!
custom signup in devise gem ROR throwing error [closed]
-
18-07-2023 - |
سؤال
When I am clicking on a button and passing it to the path of custom signin It is throwing an error that.
Routing Error No route matches [POST] "/users/sign_up"
But in the rake routes..It is present as ..
/users/sign_up(.:format) devise/registrations#new
Guide to get over to this error.
المحلول
نصائح أخرى
You probably be using button_to
in place link_to
or you passed :method => :post
with link_to
. If you are using button_to
then you need to specify :method => :get
as button_to
takes post
method by default. Use any of the two
link_to "Sign Up", "/users/sign_up"
or
button_to "Sign Up", "/users/sign_up", :method => :get
لا تنتمي إلى StackOverflow