1
0
Fork 0
mirror of https://github.com/awesome-print/awesome_print synced 2023-03-27 23:22:34 -04:00

Merge branch 'master' of git://github.com/mschulkind/awesome_print into mschulkind/master

This commit is contained in:
Mike Dvorkin 2013-09-18 13:00:39 -07:00
commit a23c9a860d

View file

@ -44,7 +44,7 @@ module AwesomePrint
def awesome_mongoid_document(object)
return object.inspect if !defined?(::ActiveSupport::OrderedHash)
data = object.attributes.sort_by { |key| key }.inject(::ActiveSupport::OrderedHash.new) do |hash, c|
data = (object.attributes || {}).sort_by { |key| key }.inject(::ActiveSupport::OrderedHash.new) do |hash, c|
hash[c[0].to_sym] = c[1]
hash
end