2013-02-20 76 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" } %> 

商祺!