method
custom_join_sql
v3.0.0 -
Show latest stable
- Class:
ActiveRecord::QueryMethods
custom_join_sql(*joins)public
No documentation available.
# File activerecord/lib/active_record/relation/query_methods.rb, line 113
def custom_join_sql(*joins)
arel = table
joins.each do |join|
next if join.blank?
@implicit_readonly = true
case join
when Hash, Array, Symbol
if array_of_strings?(join)
join_string = join.join(' ')
arel = arel.join(Arel::SqlLiteral.new(join_string))
end
when String
arel = arel.join(Arel::SqlLiteral.new(join))
else
arel = arel.join(join)
end
end
arel.joins(arel)
end