I need to create a dropdown menu helper ... But I have no idea how to do this. I wanted a helper in block form, as it is done with forms. Ex.:
<%= form_for(@teste) do |f| %>
<%= f.text_field :um_campo %>
<% end %>
In 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 %>
Could someone give an example, or even a north of how does this work?