Hi,
I'm using rails 5.1.5 and rails_best_practices 1.16.0.
I'm trying to use resources with a concern in the routes.rb but I'm having this error:
restrict auto-generated routes (only: [])
This is the code that generates the error with the concern in the resources groceries:
concern :shopper_actions do
scope module: :shops do
member do
resources :orders, only: :index
end
end
end
namespace :shoppers do
resources :groceries, param: :shop_id, controller: 'shops', only: :index,
concerns: :shopper_actions
end
and this is the code that works fine without the concern:
namespace :shoppers do
resources :groceries, param: :shop_id, controller: 'shops', only: :index do
scope module: :shops do
member do
resources :orders, only: :index
end
end
end
end
Hi, I'm using rails 5.1.5 and rails_best_practices 1.16.0. I'm trying to use resources with a concern in the routes.rb but I'm having this error:
This is the code that generates the error with the concern in the resources groceries:
and this is the code that works fine without the concern: