diff --git a/CHANGELOG.md b/CHANGELOG.md index bd3a9e8..d339ba4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ ## master (unreleased) - - new things! + - ArrayFormatter now returns arrays for has_many :through associations [@chadh13] - [#332] ## 1.8.0 - stat("$HOME/.aprc") once [@kstephens] - [#304] diff --git a/lib/awesome_print/formatters/array_formatter.rb b/lib/awesome_print/formatters/array_formatter.rb index 32973d3..3340a77 100644 --- a/lib/awesome_print/formatters/array_formatter.rb +++ b/lib/awesome_print/formatters/array_formatter.rb @@ -12,7 +12,7 @@ module AwesomePrint end def format - if array.empty? + if array.length.zero? '[]' elsif methods_array? methods_array