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

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -