From 4497c6bbdb72d35bfbb47cdb4b80205ef6ce0e44 Mon Sep 17 00:00:00 2001 From: Matchu Date: Sat, 15 May 2010 14:16:42 -0400 Subject: [PATCH] only show pagination links when there are results to avoid error --- app/views/items/index.html.haml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/items/index.html.haml b/app/views/items/index.html.haml index ec567706..a8e2bb6f 100644 --- a/app/views/items/index.html.haml +++ b/app/views/items/index.html.haml @@ -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