开发者

Image_tag in options_for_select in rails

开发者 https://www.devze.com 2023-02-14 06:04 出处:网络
This is my code <td> <%= select_tag \"options\", options_for_select( [[\"Show\", \"/registrars/\"+registrar.id.to_s],[\"Edit\", \"/edit_registrars/\"+registrar.id.to_s],

This is my code

<td> <%= select_tag "options", options_for_select( [["Show",
"/registrars/"+registrar.id.to_s],["Edit", "/edit_registrars/"+registrar.id.to_s],
["Dashboard"开发者_如何学Python, "/homes/"+registrar.enrollment_application.id.to_s], **
[image_tag("file_cabinet.png"), "/registrars/"+registrar.id.to_s]**, ] ) %></td>

I want to use this

<%= link_to(image_tag("file_cabinet.png", :border=>0), :action => :show, :id => 
registrar, :filecabinet => true) %> 

In above code if you see I tried but it is not working , any ideas??


You can't nest an image tag inside an option tag.

0

精彩评论

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