Skip to content

Commit

Permalink
fix issue mongomapper#373
Browse files Browse the repository at this point in the history
  • Loading branch information
kkamil committed Feb 12, 2012
1 parent 9aba10d commit 74a76e5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/mongo_mapper/plugins/inspect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ module Inspect
def inspect(include_nil = false)
keys = include_nil ? key_names : attributes.keys
attributes_as_nice_string = keys.sort.collect do |name|
if self[name].nil?
"#{name}: #{self.send(:"#{name}").inspect}"
else
"#{name}: #{self[name].inspect}"
end
"#{name}: #{(self[name] || self.send(:"#{name}")).inspect}"
end.join(", ")
"#<#{self.class} #{attributes_as_nice_string}>"
end
Expand Down

0 comments on commit 74a76e5

Please sign in to comment.