Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
To customize the views that doorkeeper uses, you have to generate them into your app.
rails generate doorkeeper:views
This will copy all the views to
Doorkeeper looks first for its views in that subfolder, and if not found it will fall back to its default.
To use your own layouts you can override each layout separately:
config.to_prepare do # Only Applications list Doorkeeper::ApplicationsController.layout "my_layout" # Only Authorization endpoint Doorkeeper::AuthorizationsController.layout "my_layout" # Only Authorized Applications Doorkeeper::AuthorizedApplicationsController.layout "my_layout" end
Since doorkeeper is an isolated engine, you'll have to prefix
main_app in all routes and helpers that belong to your application:
<% if main_app.user_signed_in? %> <%= link_to "Sign Out", main_app.destroy_user_session_path, :method => 'delete' %> <% else %> <%= link_to "Sign In", main_app.new_user_session_path %> <% end %>
If you need access to your ApplicationHelper methods, you can include them in
config.to_prepare do # include only the ApplicationHelper module Doorkeeper::ApplicationController.helper ApplicationHelper # include all helpers from your application Doorkeeper::ApplicationController.helper YourApp::Application.helpers end