So this is what the method in the controller looks now
def index
if(params[:q])
render :partial => 'search_results', :locals => @games
else
render :partial => 'no_search_yet'
end
end
and I removed the one "@" in the index view, but it only results in,
whenever I use the search, the "_no_search_yet" partial is being
displayed. So the index page always displays this partial, no matter I
use the search button or not.
I think the problem is, the default link "http://localhost:3000/games"
always leads to my index.view (altough not defined in the routes.rb).
Having used the search function end in another Url, but the default
always keeps the full list :/
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment