Override the view of Doorkeeper 【Ruby on Rails】
1 min readJun 27, 2021
There might be a time to change and override the view of Doorkeeper.
Of course, the way is mentioned in wiki of Doorkeeper.
# config/application.rbconfig.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
However, I couldn‘t understand ‘my_layout’. In this case, ‘my_layout’ means the file name of a html file you want to adapt. For example, if you have a file ‘application.html.erb’, it is possible to write code like below.
# config/application.rbconfig.to_prepare do
# Only Applications list
Doorkeeper::ApplicationsController.layout "application"
end
As I told you, we have to choose a html file which means we can’t override css directly. We have to pay attention to the point.