aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2010-01-20 13:24:37 +0530
committerPratik Naik <pratiknaik@gmail.com>2010-01-20 13:24:53 +0530
commit394c05ed82c1fbfc1c5d27f223b49975f439729c (patch)
tree31fd3c55831248fbf5ccc821a66b63c39d8a1104 /activerecord/lib
parent1a50d2e66a80c910fe1e2203eb2c993e5dbc4e5b (diff)
downloadrails-394c05ed82c1fbfc1c5d27f223b49975f439729c.tar.gz
rails-394c05ed82c1fbfc1c5d27f223b49975f439729c.tar.bz2
rails-394c05ed82c1fbfc1c5d27f223b49975f439729c.zip
Remove stale methods constructing joins
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-xactiverecord/lib/active_record/base.rb28
1 files changed, 0 insertions, 28 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 6063c9789f..8fcc872113 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -1455,34 +1455,6 @@ module ActiveRecord #:nodoc:
relation
end
- def construct_join(joins)
- case joins
- when Symbol, Hash, Array
- if array_of_strings?(joins)
- joins.join(' ') + " "
- else
- build_association_joins(joins)
- end
- when String
- " #{joins} "
- else
- ""
- end
- end
-
- def build_association_joins(joins)
- join_dependency = ActiveRecord::Associations::ClassMethods::JoinDependency.new(self, joins, nil)
- relation = unscoped.table
- join_dependency.join_associations.map { |association|
- if (association_relation = association.relation).is_a?(Array)
- [Arel::InnerJoin.new(relation, association_relation.first, *association.association_join.first).joins(relation),
- Arel::InnerJoin.new(relation, association_relation.last, *association.association_join.last).joins(relation)].join()
- else
- Arel::InnerJoin.new(relation, association_relation, *association.association_join).joins(relation)
- end
- }.join(" ")
- end
-
def array_of_strings?(o)
o.is_a?(Array) && o.all?{|obj| obj.is_a?(String)}
end