ElegantRails - Multiple Routes to one Controller Action
问题 I'm wondering if there is a more cleaner or elegant way of translating multiple routes to one controller action using Rails. #routes.rb get 'suggestions/proxy', to: 'suggestions#index' get 'suggestions/aimee', to: 'suggestions#index' get 'suggestions/arty', to: 'suggestions#index' ... #suggestion_controller.rb case request.env['PATH_INFO'] when '/suggestions/proxy' @suggestions = Suggestion.all.where(:suggestion_type => 'proxy') when '/suggestions/aimee' @suggestions = Suggestion.all.where(