Reputation: 3940
Ruby on Rails 3.2: I made a table, a model and controller. I want to run the "new" method in my controller. Off the top of my head I can think of a form to run the method. What other options are there to run controller methods?
In particular I would like to run the "new" method when viewing certain view files. Thank you
Upvotes: 0
Views: 27
Reputation: 527
Well, you can add the new action to a link, use a form, and call the action using Ajax. Any other alternative other than those will violate MVC.
Upvotes: 1