Ruby on Rails Wednesday, January 30, 2013

First, thank you for helping me out with this problem for this long.

The Partial I'm using is "_search_results" not "_games", so I corrected
this in my statement.

The if statement works indeed. Now the index page always shows my
desired template, when the search function was NOT used. But if it's
used there is still an error. using "games" as a partial of course
throws me a "missing template" message, but actually using the partial I
need still throws me:

NoMethodError in Games#index

Showing .../app/views/games/_games.html.erb where line #3 raised:

undefined method `each' for nil:NilClass

wether I use the "@" symbol or not in the search-field...

I feel bad not getting this straight. Even if I had come up with this
solution by myself I couldn't handle this issue.

--
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