]> git.openstreetmap.org Git - rails.git/blobdiff - app/helpers/application_helper.rb
Merge remote-tracking branch 'apmon/openstreetbugs2' into openstreetbugs
[rails.git] / app / helpers / application_helper.rb
index 2ccfcca2b0a5b8e33107d6731ae5f6b297ccf594..c24e7ff5be26b7a504c620ede19ea95d66ba30b5 100644 (file)
@@ -119,6 +119,16 @@ module ApplicationHelper
     end
   end
 
+  def preferred_editor
+    if params[:editor]
+      params[:editor]
+    elsif @user and @user.preferred_editor
+      @user.preferred_editor
+    else
+      DEFAULT_EDITOR
+    end
+  end
+
 private
 
   def javascript_strings_for_key(key)