drapergem / draper

Decorators/View-Models for Rails Applications
MIT License
5.22k stars 527 forks source link

already initialized constant in view helper modules #865

Closed blarralde closed 1 week ago

blarralde commented 4 years ago

Rails 6.0.0 Draper 3.1.0

Steps to reproduce:

Buggy behavior:

/app/helpers/test_helper.rb:2: warning: already initialized constant TestHelper::MY_CONSTANT
app/helpers/test_helper.rb:2: warning: previous definition of MY_CONSTANT was here

This seems to be due to draper loading all the helpers so it can use the h method, and then zeitwerk autoloading everything again (or the other way, I'm not sure).

Alexander-Senko commented 1 week ago

Failed to reproduce on master.