开发者

Change A Link To A Button?

开发者 https://www.devze.com 2023-03-02 18:05 出处:网络
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 %>

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"} %>
0

精彩评论

暂无评论...
验证码 换一张
取 消