I 开发者_如何学编程am trying to take an html file created by MSWord (don't ask) clean it up and create a form out of it on the fly. I am doing this work in the model (clean it up, create the form, stuff it in a DB). I would like to use the form_tag helpers, but can't quite get the hang of including them for use in the model. When I do an "include ActionView::Helpers::FormTagHelper" the helpers aren't available.
So, I figure either
- I should be doing the clean up & create in a helper
- I fundamentally don't grasp including in a model
- All of the above.
Suggestions?
Form tags should not be included in the model. They are for views only.
I've got to ask. Why? It sounds like you're in for a wold of hurt.
精彩评论