Skip to content

Commit

Permalink
Fix unknown attribute reference error
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkSiemers-msr committed May 21, 2024
1 parent d8b852e commit dd82aca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/job-iteration/active_record_batch_enumerator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def initialize(relation, columns: nil, batch_size: 100, cursor: nil)
raise JobIteration::ActiveRecordCursor::ConditionNotSupportedError
end

@base_relation = relation.reorder(@columns.join(","))
@base_relation = relation.reorder(Arel.sql(@columns.join(",")))
end

def each
Expand Down
2 changes: 1 addition & 1 deletion lib/job-iteration/active_record_cursor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def initialize(relation, columns, position = nil)
raise ConditionNotSupportedError
end

@base_relation = relation.reorder(*@columns)
@base_relation = relation.reorder(Arel.sql(@columns.join(",")))
@reached_end = false
end

Expand Down

0 comments on commit dd82aca

Please sign in to comment.