Skip to content

Commit 15e699e

Browse files
committed
Merge pull request #351 from kfarst/develop
Allow classified sorting without an ID column
2 parents c7615d4 + 9e94392 commit 15e699e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/annotate/annotate_models.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ def classified_sort(cols)
671671
end
672672
[rest_cols, timestamps, associations].each {|a| a.sort_by!(&:name) }
673673

674-
return ([id] << rest_cols << timestamps << associations).flatten
674+
return ([id] << rest_cols << timestamps << associations).flatten.compact
675675
end
676676

677677
# Ignore warnings for the duration of the block ()

0 commit comments

Comments
 (0)