2013-02-20 79 views

回答

0

基础上doc page,格式应为:

link_to_unless_current(name, options = {}, html_options = {}, &block) 

你试过:

<%= link_to_unless_current t('.en', locale: 'en'), {}, { rel: "tooltip", title: "one title" } %> 
+0

谢谢,但这是不正确的。我已经添加了正常工作的代码。谢谢! – hyperrjas 2013-02-21 09:46:41

+0

糟糕,我添加了一个额外的{}。 – Supportie 2013-02-21 20:39:07

0

此代码为我工作:

<%= link_to_unless_current t('.en'), {:locale => 'en'}, { rel: "tooltip", title: "one title" } %> 

商祺!