Skip to content
pcreux edited this page Feb 7, 2012 · 2 revisions

ActiveAdmin loads all the registered models when the routes are loaded. This prevents Spork from loading changes before each run.

# Rails 3
Spork.prefork do
  ...
  require "rails/application"
  Spork.trap_method(Rails::Application, :reload_routes!)
  
  require File.dirname(__FILE__) + "/../config/environment.rb"
  ...

h3. Rails 3.1

Routes reloading changed in Rails 3.1. Therefore you will need the following instead of the previous @Spork.trap_method@:

  require "rails/application"
  Spork.trap_method(Rails::Application::RoutesReloader, :reload!)
Clone this wiki locally