Reputation: 81
Working thru the manual (4th ed), and just want to know what is considered the best way to code using helpers, should I them to build forms in the controller or the view.
My (very) limited experience i thought it would def be the latter... pg83
Upvotes: 0
Views: 694
Reputation: 25536
My (very) limited experience i thought it would def be the latter... pg83
By "the latter", do you mean the view? Because the examples on p. 83 of the book build the forms in the controller, not the view (of course, ultimately the form is serialized in the view).
In general, you should probably process the form in the controller (which is the norm). In order to process the form, though, you must first create it -- so it should be created in the controller as well.
For more on when and where to use HTML helpers in general, see here.
Upvotes: 1