]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/browse_controller.rb
Sort out storage and use of user preferred languages.
[rails.git] / app / controllers / browse_controller.rb
index c8242a29e6fe7a6f5da52b9083cc1e3e9216ceff..12ede13da333fd030a34b29559edcaa1f9f9dd88 100644 (file)
@@ -1,8 +1,8 @@
 class BrowseController < ApplicationController
   layout 'site'
 
-  before_filter :set_locale
   before_filter :authorize_web  
+  before_filter :set_locale 
   before_filter { |c| c.check_database_readable(true) }
 
   def start 
@@ -27,7 +27,7 @@ class BrowseController < ApplicationController
   end
   
   def way
-    @way = Way.find(params[:id])
+    @way = Way.find(params[:id], :include => [:way_tags, {:changeset => :user}, {:nodes => [:node_tags, {:ways => :way_tags}]}, :containing_relation_members])
     @next = Way.find(:first, :order => "id ASC", :conditions => [ "visible = true AND id > :id", { :id => @way.id }] )
     @prev = Way.find(:first, :order => "id DESC", :conditions => [ "visible = true AND id < :id", { :id => @way.id }] )
   rescue ActiveRecord::RecordNotFound
@@ -36,7 +36,7 @@ class BrowseController < ApplicationController
   end
   
   def way_history
-    @way = Way.find(params[:id])
+    @way = Way.find(params[:id], :include => [:way_tags, {:old_ways => {:changeset => :user}}])
   rescue ActiveRecord::RecordNotFound
     @type = "way"
     render :action => "not_found", :status => :not_found