X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6ca22de4f2c68e4b14a6e2f0938a8657c33adc31..68e55078ecfea0424507ed96e0dac38502768612:/app/controllers/old_nodes_controller.rb diff --git a/app/controllers/old_nodes_controller.rb b/app/controllers/old_nodes_controller.rb index 43c8b6b75..3b187e4ab 100644 --- a/app/controllers/old_nodes_controller.rb +++ b/app/controllers/old_nodes_controller.rb @@ -1,11 +1,15 @@ -class OldNodesController < OldController - private - - def lookup_old_element - @old_element = OldNode.find([params[:id], params[:version]]) +class OldNodesController < OldElementsController + def index + @type = "node" + @feature = Node.preload(:node_tags, :old_nodes => [:old_tags, { :changeset => [:changeset_tags, :user] }]).find(params[:id]) + rescue ActiveRecord::RecordNotFound + render "browse/not_found", :status => :not_found end - def lookup_old_element_versions - @elements = OldNode.where(:node_id => params[:id]).order(:version) + def show + @type = "node" + @feature = OldNode.preload(:old_tags, :changeset => [:changeset_tags, :user]).find([params[:id], params[:version]]) + rescue ActiveRecord::RecordNotFound + render "browse/not_found", :status => :not_found end end