开发者

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜