英文:
Rails 3.2 to 5 upgrade
问题
ActionView::Helpers::InstanceTag.new不接受参数,从Rails 3.2升级到5后,应该使用什么替代方法?
ActionView::Helpers::InstanceTag.new(arg1, arg2, arg3)
会出现以下错误:
ActionView::Template::Error(参数数量不正确(给定3个,期望0个))
英文:
ActionView::Helpers::InstanceTag.new is not accepting the arguments what would be the alternate for this From rails3.2 to 5
ActionView::Helpers::InstanceTag.new(arg1,arg2,arg3)
This pops out an error
ActionView::Template::Error (wrong number of arguments (given 3, expected 0))
答案1
得分: 3
以下是翻译的部分:
该类在升级到Rails 4时已被弃用/重命名。类ActionView::Helpers::InstanceTag
已转换为名为ActiveModelInstanceTag
的模块。完整的限定符:
ActionView::Helpers::ActiveModelInstanceTag
来源:https://stackoverflow.com/questions/18409891/uninitialized-constant-actionviewhelpersinstancetag-in-rails-4
英文:
The class was deprecated/renamed in the upgrade to rails 4. The class ActionView::Helpers::InstanceTag
is transformed into module called ActiveModelInstanceTag
. Full qualifier:
ActionView::Helpers::ActiveModelInstanceTag
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论