mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-24 16:58:35 -04:00
Use slugs as params
This commit is contained in:
@@ -26,7 +26,7 @@ Rails.application.routes.draw do
|
|||||||
resources :photos, only: :index
|
resources :photos, only: :index
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :gardens, concerns: :has_photos do
|
resources :gardens, concerns: :has_photos, param: :slug do
|
||||||
get 'timeline' => 'charts/gardens#timeline', constraints: { format: 'json' }
|
get 'timeline' => 'charts/gardens#timeline', constraints: { format: 'json' }
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ Rails.application.routes.draw do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :seeds, concerns: :has_photos do
|
resources :seeds, concerns: :has_photos, param: :slug do
|
||||||
resources :plantings
|
resources :plantings
|
||||||
get 'crop/:crop' => 'seeds#index', as: 'seeds_by_crop', on: :collection
|
get 'crop/:crop' => 'seeds#index', as: 'seeds_by_crop', on: :collection
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user