I\'m trying to write a request test that asserts that the proper links appear on the application layout depending in whether a user is logged in or out. FWIW, I\'m using Dev
I had this error in my routes file because I had an API endpoint that I wanted to allow users to reset their passwords from, but I wanted the users to actually do the password change on the web view, which wasn't namespaced under /api
This is how I fixed the routes to make it work:
CoolApp::Application.routes.draw do
namespace :api, defaults: { format: :json } do
devise_scope :users do
post 'users/passwords', to: 'passwords#create'
end
resources :users, only: [:create, :update]
end
devise_for :users
root to: 'high_voltage/pages#show', id: 'home'
end