I'm getting this routing error on my site. I've went through other related questions and haven't found a solution yet.
No route matches {:action=>"show", :controller=>"businesses", :user_id=>3}
I have three models: user (contains login details), business (contains info related to users: one user has_one business), and business_hours (one business has many business_hours).
Here are my routes:
devise_for :users
get "home/index"
root :to => "home#index"
resources :users do
resources :businesses do
resources :business_hours
end
end
Edit:
I get the error just trying to access the home page (localhost:5000). I'm currently signed in. I have run rake routes and the route seems to be there:
user_business GET /users/:user_id/businesses/:id(.:format) businesses#show