Railsの使用3.次のものがあります。
# shop.rb
SHOP_TYPES = %w(cafe restaurant station)
# routes.rb
resources :shops do
member do
get :nearby_cafes, :nearby_restaurants, :nearby_stations
end
end
routes.rb
配列に別のメンバーを追加するたびに更新する代わりに、SHOP_TYPES
配列を読み取る方法はありroutes.rb
ますか?
ありがとう。