在多个视图中访问帮助文件方法?
access helper file method in more than one view?
在我的ApplicationHelper.rb
def price_count
my code is here
end
我想在多个视图文件中访问它。
谢谢。
我想你已经设置了这个
config.action_controller.include_all_helpers = false
在/config/application.rb
将 false
更改为 true
,您将能够在所有视图中访问您的辅助方法。
在我的ApplicationHelper.rb
def price_count
my code is here
end
我想在多个视图文件中访问它。
谢谢。
我想你已经设置了这个
config.action_controller.include_all_helpers = false
在/config/application.rb
将 false
更改为 true
,您将能够在所有视图中访问您的辅助方法。