1
0
Fork 0
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:
Emi Matchu 2014-06-15 17:35:08 -07:00
parent 5644ecd67b
commit 2594497434

View file

@ -17,7 +17,7 @@ class ItemsController < ApplicationController
assign_closeted! assign_closeted!
respond_to do |format| respond_to do |format|
format.html { format.html {
if @items.size == 1 if @items.total_count == 1
redirect_to @items.first redirect_to @items.first
else else
@items.prepare_partial(:item_link_partial) @items.prepare_partial(:item_link_partial)