You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: