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:
commit
a23c9a860d
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue