レール3.2。ここでは、 (テーブルの列にある)すべてをhttp://domain.dev/toys
表示するようにすべてに指示したいと思います。shops
shop_type
toys
# routes.rb
resources :shops
match 'toys' => 'shops#index', :as => :toys, :via => :get, :constraints => {:shop_type => 'toys'}
# shops_controller.rb
def index
@shops = Shop.find(:all)
end
私は何を間違えましたか?ありがとう。