How to properly define constants in helpers?

Let's say I have a helper module like this

module ThingsHelper
  DEFAULT_OPTIONS = { ... }.freeze

  def my_helper(options = {})

Then, in development environment, I get

.../app/helpers/things_helper.rb:2: warning: already initialized

Is there anything I can do about this warning?


I think you are having the same problem as I at
. I bet your helper is getting included twice.

I'm not sure. I'm *never* including it explicitly. As it is a helper, it
is loaded automatically.

However, there is one special thing. I'm defining the helper in question
in an engine and to have it included automatically by helper :all, I add
the path engine helper path in an initializer block of the engine

initializer 'make MyEngine helpers automatically loadable',
    :before => "action_controller.set_configs" do |app| do |path| << path

and unfortunately, that in some way appears to cause the warning.