开发者

Include FormTagHelper in model?

开发者 https://www.devze.com 2023-01-05 02:33 出处:网络
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, st

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消