How to use link_to inside select_tag? [closed]
How can I use link_to inside select_tag ? Something like this ...
<%= select_tag "test1","<option>#{link_to 'View Details', view_path(test)}</option><option>#{link_to 'Delete', delete_path(test)}</option><option>#{link_to 'Edit Details', edit_path(test)}</option>"%>
Any solution ?
<%= select_tag "test1","<option value='#{view_path(test)}'>View Details</option><option value='#{delete_path(test)}'>Delete</option><option value='#{edit_path(test)}'>Edit Details</option>" ,:onchange => "window.open(this.options[this.selectedIndex].value,'_top')" %>
精彩评论