forked from OpenNeo/impress
whoops; if page 2 of a search had 1 item, we jumped right to it, as if it
were the *only* result. now only do that redirect if *total* results == 1. Mad props to diceroll123. Welcome to the commit log, bro.
This commit is contained in:
parent
5644ecd67b
commit
2594497434
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ class ItemsController < ApplicationController
|
|||
assign_closeted!
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
if @items.size == 1
|
||||
if @items.total_count == 1
|
||||
redirect_to @items.first
|
||||
else
|
||||
@items.prepare_partial(:item_link_partial)
|
||||
|
|
Loading…
Reference in a new issue