I’m having trouble getting redirect_to to work.
I have a search controller with the following code:
if params[:format].include?("map") source = params[:format].split('_').second redirect_to :controller => "geodatas", :action => "map", :source
if params[:viewtable] == “images”
redirect_to :controller => “images”, :action => “list”
redirect_to :controller => “samples”, :action =>
In the last else it is supposed to redirect to the resultslist action
of the samples controller, but it is going to the show action
instead. This is the error that shows in the browser.
ActiveRecord::RecordNotFound in SamplesController#show
Couldn’t find Sample with ID=resultslist
Why is it going to the show action??