Uninitialized constant ActionView::Helpers::InstanceTag in Rails 4

拟墨画扇 提交于 2020-01-13 11:33:10

问题


I have the following code, which I use to customize form_for. I need to inherit ActionView::Helpers::InstanceTag

class InstanceTag < ActionView::Helpers::InstanceTag

I get exception after the upgrade to Rails 4 and I saw that in the docs there is no such class. What is the best class to use instead of it?


回答1:


After some research. I found that

ActionView::Helpers::InstanceTag 

is transformed into module called ActiveModelInstanceTag

ActionView::Helpers::ActiveModelInstanceTag


来源:https://stackoverflow.com/questions/18409891/uninitialized-constant-actionviewhelpersinstancetag-in-rails-4

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