ruby on rails - Best use of content_tag in a custom link_to helper method -
what best way use custom helper method in order generate html tags links , html options?
lets
def drop_document_options(title,document,version,html_options) end
in order generate link parameters:
<div class="dropdown"> <button class="btn btn-default btn-sm dropdown-toggle" type="button" data-toggle="dropdown"> <%=@hebrew_document[document]%> - <%=@hebrew_version[version]%> <span class="caret"></span></button> <ul class="dropdown-menu dropdown-menu-right"> <li> <%=link_to( {:controller => "invoices", :action => "download", :id => document.id, :disposition => 'inline', :version => version[i]} , html_options ) %> <%=action_title%> <% end %> </li> </ul> </div>
Comments
Post a Comment