Issue Details (XML | Word | Printable)

Key: CODEBASE-218
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Jonathan Rochkind
Reporter: Jonathan Rochkind
Votes: 0
Watchers: 0
Operations

Clone this issue
If you were logged in you would be able to see more operations.
Blacklight Plugin

local application_controller needs require_dependency instead of require

Created: 04/May/10 10:33 AM   Updated: 05/May/10 09:20 AM
Component/s: None
Affects Version/s: None
Fix Version/s: 2.5


 Description  « Hide
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.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Jonathan Rochkind added a comment - 05/May/10 09:20 AM
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.