Rails 3.2. Here, I wanna direct all http://domain.dev/toys to only show all shops which shop_type (in my table column) is 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 What have I done wrong? Thanks.