Skip to content

Commit

Permalink
Load routes in railtie after after_initialize
Browse files Browse the repository at this point in the history
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
latentflip authored and oriolgual committed Oct 26, 2011
1 parent 31a8f9a commit 2748c3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/spinach-rails/railtie.rb
Expand Up @@ -8,7 +8,7 @@ class Railtie < ::Rails::Railtie
File.dirname(__FILE__), '..', '..', 'tasks/spinach.rake') File.dirname(__FILE__), '..', '..', 'tasks/spinach.rake')
) )
end end
initializer "add_routes", after: :disable_dependency_loading do |app| initializer "add_routes", after: :after_initialize do |app|
routes = app.routes.url_helpers routes = app.routes.url_helpers
Spinach::FeatureSteps.send(:include, routes) Spinach::FeatureSteps.send(:include, routes)
end end
Expand Down

0 comments on commit 2748c3e

Please sign in to comment.