Improve recognition of OAuth referers for triggering of slim mode
This commit is contained in:
parent
25815dfb4d
commit
b77c6fe8ae
1 changed files with 3 additions and 1 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Reference in a new issue