]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/browse_controller.rb
Use a more rails like way for the new coordinates link, which also localizes the...
[rails.git] / app / controllers / browse_controller.rb
index c8242a29e6fe7a6f5da52b9083cc1e3e9216ceff..259ce0dc9377fa4b9e607fc8d866b945dba447f2 100644 (file)
@@ -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