Reputation: 149
Hey so how can i turn this into a button in rails?
<%= link_to "+Add Attachment!", :controller => "assets", :action => "new", :lesson_id => @lesson %>
Upvotes: 0
Views: 45
Reputation: 2923
<%= button_to "+ Add Attachment", ... %>
Look into using the RESTful routing system, though, rather than specifying the :controller => "assets", :action => "new", ...
hash.
You might consider using CSS to make the <a>
from your <%= link_to ... %>
look nice, rather than replacing it with an awkward button.
Upvotes: 1