在我的导航配置文件中,我有:
sub_nav.item t.id, t.h1.force_encoding("UTF-8"), tag_path(d.slug, t.slug, params.except(:controller, :action).merge(:tag_id => t.id, :page => nil, :kat_id => nil))
我不希望它成为链接if params[:tag_id] = t.id
答案 0 :(得分:0)
if params[:tag_id] == t.id
sub_nav.item t.id, t.h1.force_encoding("UTF-8"), tag_path(d.slug, t.slug, params.except(:controller, :action).merge(:tag_id => t.id, :page => nil, :kat_id => nil))
else
sub_nav.item t.id, t.h1.force_encoding("UTF-8")
end