1
I need to create a dropdown menu helper... but I don’t have much idea how to do that. Wanted a block helper, as is done with forms. Ex.:
<%= form_for(@teste) do |f| %>
<%= f.text_field :um_campo %>
<% end %>
On my helper, I wish I could do something like this:
<%= dropdown_menu, class: 'teste' do %>
<%= menu_item "Teste", "fa fa-icon", teste_path %>
<%= menu_item "Teste", "fa fa-icon", teste_path %>
<%= menu_item "Teste", "fa fa-icon", teste_path %>
<% end %>
One could give an example, or even a north of how it works?