Browse files

Load routes in railtie after after_initialize

Fixes issue #2.
Some rails gems (i.e. Devise) set up their own routes in initializers,
so we should load the routes into Spinach after this has happened
and not before.
  • Loading branch information...
1 parent 31a8f9a commit 2748c3e6bee044c33c74e1faadfa4f7b8e0df60e @latentflip latentflip committed with oriolgual Oct 26, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/spinach-rails/railtie.rb
@@ -8,7 +8,7 @@ class Railtie < ::Rails::Railtie
File.dirname(__FILE__), '..', '..', 'tasks/spinach.rake')
- initializer "add_routes", after: :disable_dependency_loading do |app|
+ initializer "add_routes", after: :after_initialize do |app|
routes = app.routes.url_helpers
Spinach::FeatureSteps.send(:include, routes)

0 comments on commit 2748c3e

Please sign in to comment.