]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/user_controller.rb
Increase search radius at lower zooms
[rails.git] / app / controllers / user_controller.rb
index 99777ca2d83c0846c78b69db30fea00d5eaabc48..dbfc44a37ad7af34cb558658408366a1c00e6391 100644 (file)
@@ -1,5 +1,5 @@
 class UserController < ApplicationController
-  layout :choose_layout
+  layout 'site', :except => [:api_details]
 
   skip_before_filter :verify_authenticity_token, :only => [:api_read, :api_details, :api_gpx_files]
   before_filter :disable_terms_redirect, :only => [:terms, :save, :logout, :api_details]
@@ -786,21 +786,6 @@ private
     redirect_to :controller => 'user', :action => 'view', :display_name => params[:display_name] unless @this_user
   end
 
-  ##
-  # 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 => :authorize, :only_path => true)
-
-    if [ 'api_details' ].include? action_name
-      nil
-    elsif params[:referer] and URI.parse(params[:referer]).path == oauth_url
-      'slim'
-    else
-      'site'
-    end
-  end
-
   ##
   #
   def disable_terms_redirect