Hi I am relatively new to Rails framework. I started doing a POC. I am stuck into strange problem.
My routes.rb has below:
resources :seekers, only: [ :index, :show, :create ]
My seekers_controller has below code
class SeekersController < ApplicationController
def create
#byebug
"some code"
end
end
it was working earlier, i was trying to add another controller resource with same functionality , then realized its not working. Then I reverted back the code just test it, and found the old code is also not working. for every thing it just throws the below error:-
ActionController::RoutingError (No route matches [POST] "/seekers"):
My rail routes gives me correct as below path:
POST /seekers(.:format)
seekers#create
GET /seekers/:id(.:format)
The Rest Url which i am using as below
http://localhost:3000/seekers
Don't know what is wrong. everything was working fine earlier. I have tried to changing the routes.rb by multiple way but nothing works.
Appreciate help on this !!!
version details as below: ruby '2.3.3' gem 'rails', '~> 5.2.2', '>= 5.2.2.1'
Aucun commentaire:
Enregistrer un commentaire