X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/4b20afd51e640d67a32b241349be9d2f7eac64b0..10033fded101ef323b8add0d702ed17d40c5f7dd:/app/controllers/user_controller.rb diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 649c0c907..72d60a307 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -501,9 +501,11 @@ private # Choose the layout to use. See # https://rails.lighthouseapp.com/projects/8994/tickets/5371-layout-with-onlyexcept-options-makes-other-actions-render-without-layouts def choose_layout + oauth_url = url_for(:controller => :oauth, :action => :oauthorize, :only_path => true) + if [ 'api_details' ].include? action_name nil - elsif params[:referer] == url_for(:controller => :oauth, :action => :oauthorize, :only_path => true) + elsif params[:referer] and URI.parse(params[:referer]).path == oauth_url 'slim' else 'site'