I'm new to Ruby on Rails. I'm building out an app that does custom operations on defined nodes (the object). Here's my table:
<% @nodes.each do |node| %>
<tr>
<td><%= node.name %></td>
<td><%= link_to 'Bootstrap', node_path(node),
method: :bootstrap %>
</td>
</tr>
<% end %>
"Bootstrap" is the custom code that I want to run. I'm defined a custom method within my Controller:
class NodesController < ApplicationController
def bootstrap
......
end
........
end
How do I tie in my custom code to my Rails app so that when a user clicks on the link the code will be run against that object?