merge_conditions (ActiveRecord::Base)

    # File lib/active_record/base.rb, line 1436
          def merge_conditions(*conditions)
            segments = []

            conditions.each do |condition|
              unless condition.blank?
                sql = sanitize_sql(condition)
                segments << sql unless sql.blank?
              end
            end

            "(#{segments.join(') AND (')})" unless segments.empty?
          end