Reputation: 1212
I have this link - but I want to turn it into a button in rails 3?
<%= link_to 'New Article', new_article_path %>
Upvotes: 2
Views: 2903
Reputation: 360016
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"} %>
Upvotes: 3