Flowdock
method

custom_join_sql

Importance_0
v3.0.0 - Show latest stable - 0 notes - Class: ActiveRecord::QueryMethods
custom_join_sql(*joins) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# 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
Register or log in to add new notes.