]> git.openstreetmap.org Git - rails.git/blobdiff - app/helpers/application_helper.rb
Improve name selection with the query tool
[rails.git] / app / helpers / application_helper.rb
index bb09f3a49953bd66ec26fcb8734befb800c767e1..2fc0d808d53c87566318ac254b8f523587952726 100644 (file)
@@ -48,13 +48,14 @@ module ApplicationHelper
   def application_data
     data = {
       :locale => I18n.locale,
-      :preferred_editor => preferred_editor
+      :preferred_editor => preferred_editor,
+      :preferred_languages => preferred_languages.expand.map(&:to_s)
     }
 
     if current_user
       data[:user] = current_user.id.to_json
 
-      data[:user_home] = { :lat => current_user.home_lat, :lon => current_user.home_lon } unless current_user.home_lon.nil? || current_user.home_lat.nil?
+      data[:user_home] = { :lat => current_user.home_lat, :lon => current_user.home_lon } if current_user.home_location?
     end
 
     data[:location] = session[:location] if session[:location]