From 28b886362755cb6750b62222cecf87bd9b2efbbe Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 26 Feb 2014 18:53:25 +0000 Subject: [PATCH] Remove unused (and non-functioning) code --- app/models/node.rb | 2 +- app/models/relation.rb | 2 +- app/models/way.rb | 2 +- lib/object_finder.rb | 5 ----- 4 files changed, 3 insertions(+), 8 deletions(-) delete mode 100644 lib/object_finder.rb diff --git a/app/models/node.rb b/app/models/node.rb index 12ffa2091..09f494b7c 100644 --- a/app/models/node.rb +++ b/app/models/node.rb @@ -21,7 +21,7 @@ class Node < ActiveRecord::Base has_many :ways_via_history, :class_name=> "Way", :through => :old_way_nodes, :source => :way has_many :containing_relation_members, :class_name => "RelationMember", :as => :member - has_many :containing_relations, :class_name => "Relation", :through => :containing_relation_members, :source => :relation, :extend => ObjectFinder + has_many :containing_relations, :class_name => "Relation", :through => :containing_relation_members, :source => :relation validates_presence_of :id, :on => :update validates_presence_of :timestamp,:version, :changeset_id diff --git a/app/models/relation.rb b/app/models/relation.rb index 4e4235049..008f365c4 100644 --- a/app/models/relation.rb +++ b/app/models/relation.rb @@ -15,7 +15,7 @@ class Relation < ActiveRecord::Base has_many :relation_tags has_many :containing_relation_members, :class_name => "RelationMember", :as => :member - has_many :containing_relations, :class_name => "Relation", :through => :containing_relation_members, :source => :relation, :extend => ObjectFinder + has_many :containing_relations, :class_name => "Relation", :through => :containing_relation_members, :source => :relation validates_presence_of :id, :on => :update validates_presence_of :timestamp,:version, :changeset_id diff --git a/app/models/way.rb b/app/models/way.rb index a9fdd88ee..1da048c96 100644 --- a/app/models/way.rb +++ b/app/models/way.rb @@ -17,7 +17,7 @@ class Way < ActiveRecord::Base has_many :way_tags has_many :containing_relation_members, :class_name => "RelationMember", :as => :member - has_many :containing_relations, :class_name => "Relation", :through => :containing_relation_members, :source => :relation, :extend => ObjectFinder + has_many :containing_relations, :class_name => "Relation", :through => :containing_relation_members, :source => :relation validates_presence_of :id, :on => :update validates_presence_of :changeset_id,:version, :timestamp diff --git a/lib/object_finder.rb b/lib/object_finder.rb deleted file mode 100644 index 26608a7f9..000000000 --- a/lib/object_finder.rb +++ /dev/null @@ -1,5 +0,0 @@ -module ObjectFinder - def visible - find :all, :conditions => "#{proxy_reflection.table_name}.visible = 1" - end -end -- 2.39.5