Skip to content

Commit 359d396

Browse files
authored
fix: use stable sort for schema fields so we get same results across OS (#577)
also closes #575 Co-authored-by: MaicolBen <[email protected]>
1 parent 6c36378 commit 359d396

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/services/forest_liana/schema_adapter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def perform
88
add_columns
99
add_associations
1010

11-
collection.fields.sort_by! { |k| k[:field].to_s }
11+
collection.fields.sort_by!.with_index { |k, idx| [k[:field].to_s, idx] }
1212

1313
# NOTICE: Add ActsAsTaggable fields
1414
if @model.try(:taggable?) && @model.respond_to?(:acts_as_taggable) &&

0 commit comments

Comments
 (0)