Closed MrDys closed 12 years ago
Original reporter: jrochkind
jrochkind: Okay, change committed for now. Changed the require to require_dependency in the template.rb installer.
Necessary to keep it from messing up the new html_head stuff. If this isn't optimal, some other solution can be found later.
CODEBASE-218: The template installer adds a line to your local application_controller:
"require '#{install_path}/app/controllers/application_controller.rb'"
That results in double-loading of the BL core ApplicationController, causing before_filters to be applied twice, causing double-listing of JS and CSS using the new html_head stuff.
Changing this to require_dependency instead of require appears to fix the problem.
Longer term, this stuff is REALLY confusing, and we probably want to find a simpler way to do it, perhaps using an explicit differently-named module or class that is explicitly include'd or inherited by the local application_controller, instead of relying on confusing Engines-style mix-in magic. Unless Rails 3.0 makes this stuff less confusing with it's attention to Engines.