All right I fixed it now!!
Appearently all I had to put in the if statement, was the same code-line
I originally used for simply displaying the list:
def index
@games = Game.search(params[:search])
end
I don't even have to do an if-statement in the controller at all. That
goes to the html.erb, where either partial has to be displayed.
<% if(params[:search]) %>
<%= render 'search_results' %>
<% else %>
<%= render 'no_search_yet' %>
<% end %>
Otherwise, my "no_search_yet" partial would be displayed without
inhertiting any css...
Thanks anyway for your help guys, you were great!!
A far more greater issue would be the rating system I'm trying to
develop, but noone has replied in this thread so far :)
--
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