I have this structure in my view:
<ul>
<% @categories.each do |category| %>
<li> <%= category.name %> <a href='#'>Edit</a> </li>
<% end %>
</ul>
Now, I want to popup a modal when I click "Edit" and in this modal to place a form for editing corresponding category. I want to avoid to generate a modal for each element from loop and I want to have a generic modal and call it each time, with specific parameters. Is this possible?