Change A Link To A Button?
I h开发者_Go百科ave this link - but I want to turn it into a button in rails 3?
<%= link_to 'New Article', new_article_path %>
Use a button-styled link.
<%= link_to 'New_Article', {:controller => "articles", :action => "new"}, {"data-icon" => "button", "data-theme" => "a"} %>
Or, as @Zabba points out, use the button_to
helper.
<%= button_to 'New Article', {:controller => "articles", :action => "new"} %>
精彩评论