2012-08-03 43 views
1

我需要添加替代文字到button_to標記。rails button_to ---替代文字

這裏是我的按鈕代碼:

<%= button_to 'Reject' , reject_paper_path(paper), :confirm => 'Are you sure you want to reject this paper?' %> 

我想一個文本當用戶將鼠標懸停不上的按鈕出現。

有什麼建議嗎?

謝謝

回答

1

明白了:

<%= button_to 'Reject' , reject_paper_path(paper), :title=> "title text", :confirm => 'Are you sure you want to reject this paper?' %> 

您只需添加標題選項。

希望它可以幫助別人。

+0

感謝您的解決方案! +1 – Laerte 2015-04-01 13:04:15