def add_wheres arel
      @query.where.inject(arel) { |memo, where| memo.where where }
    end
def add_wheres arel
      @query.where.inject(arel) { |memo, where| memo.where where }
    end
Adds the WHERE clauses from the given query to the given arel construct.