diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 600022c09..f3c65d9a4 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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" diff --git a/app/helpers/aspects_helper.rb b/app/helpers/aspects_helper.rb index c495464f3..bcab3a14d 100644 --- a/app/helpers/aspects_helper.rb +++ b/app/helpers/aspects_helper.rb @@ -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 ||= {} diff --git a/app/helpers/tags_helper.rb b/app/helpers/tags_helper.rb deleted file mode 100644 index 5e205fc55..000000000 --- a/app/helpers/tags_helper.rb +++ /dev/null @@ -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