面对这样的问题。请告诉我为什么会这样?
NoMethodError in Searches#index
undefined method `<' for nil:NilClass
Extracted source (around line #14):
11: </div>
12: <div class="results">
13: <table>
14: <% @searches.each do |search, book| %>
15: <tr>
16: <% if session[:user_id] %>
17: <td><%= search.name %></td>