Skip to content

Integration with multi engine Rails application

Nikita Bulai edited this page Jun 10, 2019 · 2 revisions

Draw routes in the root application from within the Api engine. Example:

# engines/api/config/routes.rb

Rails.application.routes.draw do
  use_doorkeeper scope: 'api/v1/oauth'
end

Api::Engine.routes.draw do
  scope 'v1' do
    # your other engine routes here
  end
end

Discussion over multi-engine architecture and Doorkeeper integration: https://github.com/doorkeeper-gem/doorkeeper/issues/1083

Clone this wiki locally