Rails 3: using non-Active Record objects with form_for

本秂侑毒 提交于 2019-12-04 16:19:10

问题


Is there any documentation, or advice?


回答1:


You can use Active Model

Take a look here.

Look at the source code at Github.




回答2:


Using ActiveAttr is the more modern way of doing this.

Gem: https://github.com/cgriego/active_attr
Railscast: http://railscasts.com/episodes/326-activeattr



来源:https://stackoverflow.com/questions/4241779/rails-3-using-non-active-record-objects-with-form-for

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!