Skip to content

Commit

Permalink
Merge pull request #351 from kfarst/develop
Browse files Browse the repository at this point in the history
Allow classified sorting without an ID column
  • Loading branch information
ctran committed Feb 26, 2016
2 parents c7615d4 + 9e94392 commit 15e699e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/annotate/annotate_models.rb
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ def classified_sort(cols)
end
[rest_cols, timestamps, associations].each {|a| a.sort_by!(&:name) }

return ([id] << rest_cols << timestamps << associations).flatten
return ([id] << rest_cols << timestamps << associations).flatten.compact
end

# Ignore warnings for the duration of the block ()
Expand Down

0 comments on commit 15e699e

Please sign in to comment.