here is the app routes file
# config/routes.rb
Rails.application.routes.draw do
root :to => "home#index"
mount ReactiveRecord::Engine => "reactive_record"
end
here is the engine.rb file
# reactive_record/lib/reactive_record/engine.rb
module ReactiveRecord
class Engine < Rails::Engine
isolate_namespace ReactiveRecord
config.generators do |g|
g.test_framework :rspec, :fixture => false
g.fixture_replacement :factory_girl, :dir => 'spec/factories'
g.assets false
g.helper false
end
end
end
here is the engines routes file:
# reactive_record/config/routes.rb
ReactiveRecord::Engine.routes.draw do
root to: "reactive_record#fetch"
end
rake routes says:
root / home#index
reactive_record /reactive_record ReactiveRecord::Engine
Routes for ReactiveRecord::Engine:
no routes are listed for the engine, and if i visit localhost:3000/reactive_record I get a 404.
Everything else is working fine. I.e. all the code in the gem is working and accessible.
Thanks in advance, I;m sure I;m missing something trivial
Aucun commentaire:
Enregistrer un commentaire