only show pagination links when there are results to avoid error

This commit is contained in:
Emi Matchu 2010-05-15 14:16:42 -04:00
parent 3062dd9376
commit 4497c6bbdb

View file

@ -1,6 +1,7 @@
= form_tag items_path, :method => :get do
= text_field_tag :q, @query
= submit_tag 'Search', :name => nil
= will_paginate @results
= render @results
= will_paginate @results
- if @results
= will_paginate @results
= render @results
= will_paginate @results