Remove never actually used code from five years ago
This commit is contained in:
parent
508ac0265a
commit
e341ef5673
2 changed files with 0 additions and 27 deletions
|
@ -128,9 +128,6 @@ class ApiController < ApplicationController
|
|||
end
|
||||
|
||||
@nodes = Node.bbox(bbox).where(:visible => true).includes(:node_tags).limit(MAX_NUMBER_OF_NODES+1)
|
||||
# get all the nodes, by tag not yet working, waiting for change from NickB
|
||||
# need to be @nodes (instance var) so tests in /spec can be performed
|
||||
#@nodes = Node.search(bbox, params[:tag])
|
||||
|
||||
node_ids = @nodes.collect(&:id)
|
||||
if node_ids.length > MAX_NUMBER_OF_NODES
|
||||
|
|
|
@ -39,30 +39,6 @@ class Node < ActiveRecord::Base
|
|||
errors.add(:base, "Node is not in the world") unless in_world?
|
||||
end
|
||||
|
||||
#
|
||||
# Search for nodes matching tags within bounding_box
|
||||
#
|
||||
# Also adheres to limitations such as within max_number_of_nodes
|
||||
#
|
||||
def self.search(bounding_box, tags = {})
|
||||
# @fixme a bit of a hack to search for only visible nodes
|
||||
# couldn't think of another to add to tags condition
|
||||
#conditions_hash = tags.merge({ 'visible' => 1 })
|
||||
|
||||
# using named placeholders http://www.robbyonrails.com/articles/2005/10/21/using-named-placeholders-in-ruby
|
||||
#keys = []
|
||||
#values = {}
|
||||
|
||||
#conditions_hash.each do |key,value|
|
||||
# keys << "#{key} = :#{key}"
|
||||
# values[key.to_sym] = value
|
||||
#end
|
||||
#conditions = keys.join(' AND ')
|
||||
|
||||
find_by_area(bounding_box, :conditions => {:visible => true},
|
||||
:limit => MAX_NUMBER_OF_NODES+1)
|
||||
end
|
||||
|
||||
# Read in xml as text and return it's Node object representation
|
||||
def self.from_xml(xml, create=false)
|
||||
begin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue