fix chris tag cloud

This commit is contained in:
Matt K. Fu 2013-05-27 19:14:50 +08:00
parent 253cca06cc
commit 6b8b749b0f
2 changed files with 6 additions and 1 deletions

View File

@ -2,6 +2,11 @@ module ApplicationHelper
FLASH_NOTICE_KEYS = [:error, :notice, :warning]
def current_path(param_hash)
request.referer.include?('?') ? [request.referer,param_hash.to_param].join('&') : [request.referer,param_hash.to_param].join('?')
end
def delayed_impressionist(object)
# Resque.enqueue_at(1.minute.from_now,DelayedImpressionist,object)
end

View File

@ -3,7 +3,7 @@
<h3 class="h3"><%= t(:tag_cloud) %></h3>
<div class="cloud">
<% @tags.each do |tag| %>
<%= link_to tag[0].name, '#?' + {:tag_id => tag[0].id, :category_id => params[:category_id]}.to_param, :class => "#{tag[1]} #{tag[0].id.to_s.eql?(params[:tag_id]) ? 'active' : nil} " %>
<%= link_to tag[0].name, current_path({:tag_id => tag[0].id, :category_id => params[:category_id]}), :class => "#{tag[1]} #{tag[0].id.to_s.eql?(params[:tag_id]) ? 'active' : nil} " %>
<% end %>
</div>
</div>