我有这个链接 - 但是我想把它变成rails 3中的一个按钮?
<%= link_to 'New Article', new_article_path %>
答案 0 :(得分:3)
<%= link_to 'New_Article', {:controller => "articles", :action => "new"}, {"data-icon" => "button", "data-theme" => "a"} %>
或者,正如@Zabba指出的那样,使用button_to
帮助器。
<%= button_to 'New Article', {:controller => "articles", :action => "new"} %>