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.

To fix this, you can delay route loading:

Spork.prefork do
  ...
  require "rails/application"
  Spork.trap_method(Rails::Application, :reload_routes!) # Rails 3.0
  Spork.trap_method(Rails::Application::RoutesReloader, :reload!) # Rails 3.1

  require File.dirname(__FILE__) + "/../config/environment.rb"
  ...
Clone this wiki locally