Fix pagination on tags, specs are red, need to take all helpers out of applicationController
This commit is contained in:
parent
b4e36878fe
commit
28a997c2cd
3 changed files with 6 additions and 14 deletions
|
|
@ -5,8 +5,12 @@
|
|||
module ApplicationHelper
|
||||
@@youtube_title_cache = Hash.new("no-title")
|
||||
|
||||
def next_page
|
||||
params[:page] ? (params[:page].to_i + 1) : 2
|
||||
def next_page_path
|
||||
if @controller.instance_of?(TagsController)
|
||||
tag_path(@tag, :max_time => @posts.last.send(session[:sort_order].to_sym).to_i)
|
||||
else
|
||||
aspects_path(:max_time => @posts.last.send(session[:sort_order].to_sym).to_i, :a_ids => params[:a_ids])
|
||||
end
|
||||
end
|
||||
def timeago(time, options = {})
|
||||
options[:class] ||= "timeago"
|
||||
|
|
|
|||
|
|
@ -3,9 +3,6 @@
|
|||
# the COPYRIGHT file.
|
||||
|
||||
module AspectsHelper
|
||||
def next_page_path
|
||||
aspects_path(:max_time => @posts.last.send(session[:sort_order].to_sym).to_i, :a_ids => params[:a_ids])
|
||||
end
|
||||
def link_for_aspect(aspect, opts={})
|
||||
opts[:params] ||= {}
|
||||
params ||= {}
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
# Copyright (c) 2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
||||
module TagsHelper
|
||||
def next_page_path
|
||||
tag_path(@tag, :max_time => @posts.last.send(session[:sort_order].to_sym).to_i)
|
||||
end
|
||||
end
|
||||
Loading…
Reference in a new issue