Skip to content

Fixes controller require order#4

Open
mgiagante wants to merge 2 commits intopatriciomacadden:masterfrom
mgiagante:fix_controller_require_order
Open

Fixes controller require order#4
mgiagante wants to merge 2 commits intopatriciomacadden:masterfrom
mgiagante:fix_controller_require_order

Conversation

@mgiagante
Copy link
Copy Markdown

When I copied the template and tried to rack up the app, I found that the RootController was being required before the ApplicationController it requires, causing the following error:

/hat/app/controllers/root_controller.rb:1:in `<top (required)>': uninitialized constant HAT::ApplicationController (NameError)

This fixes the error by assuming the file containing it is named application_controller (couldn't think of a better way), removing it form the array and appending it, so that it gets required first.

Hope it helps!

Mariano Giagante added 2 commits October 4, 2017 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant