I have the following code in a view file of my rails application:
<td>
<div class="file_description"><%= object.metadata['description']%>
<button type="button" class="btn btn-default edit_description">Edit</button></div>
<div class="file_description_update"
<%= form_tag({:action => 'update_file_info'}, multipart: true) do %>
Update File Description: <%= text_area_tag :description %>
<%= hidden_field_tag :s3_path, file %>
<%= hidden_field_tag :prefix, @prefix %>
<%= submit_tag 'Submit' %> </td> <br />
<% end %>
</div>
</td>
I need to bind my Edit button on click event with the class file_description_update for each file I will be working with. Any views on the simplest way to do that in rails? Thanks