What is the best way to use a custom helper method in order to generate html tags with links and html options?
lets say
def drop_document_options(title,document,version,html_options)
end
in order to generate a link with the 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 ) do %>
<%=action_title%>
<% end %>
</li>
</ul>
</div>
Aucun commentaire:
Enregistrer un commentaire