如何将模块ApplicationHelper加载到config / environments / development.rb?

时间:2016-09-01 10:03:56

标签: ruby-on-rails

我试图在config / environments / development.rb中加载ApplicationHelper模块:

Rails.application.configure do
...
  include ApplicationHelper
...(here I want to call my functions from ApplicationHelper)
end

我需要调用ApplicationHelper中定义的函数。

但是当我启动rails服务器时,我收到错误:

  

未定义的方法`include'为#   (NoMethodError)

如何以正确的方式包含ApplicationHelper模块?

0 个答案:

没有答案