I'm new to Ruby on Rails (RoR). I created a new method on my controller. I want to call the new method from a view.
On my view, I have this code:
<%= link_to "MyMethod", :method=>:MyMethod %>
When I click on the link, the URL changes to http://localhost:3000/seats?method=MyMethod
, and the page reloads on the browser and from the log I can see that MyMethod
is never executed.
What can I do to call a method from a view?