Reputation: 5860
The Controller:
class SearchController < ApplicationController
def index
end
end
routes.rb
get "search/index"
from rake routes
search_index GET /search/index(.:format) search#index
when i try to go to http://localhost:3000/search
i get a 404 page error...
Upvotes: 0
Views: 364
Reputation: 10769
Your routes should be:
search_index GET /search(.:format) search#index
change your get "search/index"
to:
resources :search, :only => [:index]
Upvotes: 4