I'm upgrading doorkeeper to 6.7 and I have a problem with use_doorkeeper:
I followed the migration instructions and did the following:
my routes before the upgrade:
scope "(:locale)", :locale => /.{2}/ do
...
mount Doorkeeper::Engine => '/oauth', as: 'doorkeeper'
...
end
my routes after the upgrade:
scope "(:locale)", :locale => /.{2}/ do
...
use_doorkeeper
...
end
Now I get an error from this line (and others) in my view:
<td><%= link_to application.name, [:oauth, application] %></td>
Routing Error
No route matches {:action=>"show", :controller=>"doorkeeper/applications", :locale=>#< Doorkeeper::Application id: 5, name: "My App", uid: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...", secret: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...", redirect_uri: "http://www.myapp.com", created_at: "2013-08-26 14:33:38", updated_at: "2013-08-26 14:33:38">}
It seems that doorkeeper application is getting into the locale param.
Any idea?
If you've followed the rails guides, you'll have something like the following in your
ApplicationController
.But your doorkeeper controllers don't inherit from your
ApplicationController
. So if I were you I'd pull that out into a concernThen you can
include
this in your ownApplicationController
in the normal way. For adding it to doorkeeper, there's a lot of options, but one thing you could do is add the following to config/application.rb