-
-
Save niklas/1344547 to your computer and use it in GitHub Desktop.
Devise + Spork + Rails 3.1 RC4 hacks to keep User model from loading prefork
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Spork.prefork do | |
require "rails/application" | |
# Prevent Devise from loading the User model super early with it's route hacks for Rails 3.1 rc4 | |
# see also: https://github.com/sporkrb/spork/wiki/Spork.trap_method-Jujutsu | |
Spork.trap_method(Rails::Application, :reload_routes!) | |
Spork.trap_method(Rails::Application::RoutesReloader, :reload!) | |
# rest of your prefork here... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment