Skip to content
Browse files

cleanup property lookup, as per dkubb's suggestion

  • Loading branch information...
1 parent 0a8eab9 commit eb67cb85c4b279ee08571a5eae2ba1c3db3c45f6 Wesley Beary committed Jul 18, 2008
Showing with 2 additions and 2 deletions.
  1. +2 −2 adapters/dm-couchdb-adapter/lib/couchdb_adapter.rb
View
4 adapters/dm-couchdb-adapter/lib/couchdb_adapter.rb
@@ -18,9 +18,9 @@ def to_json(dirty = false)
return (property_list.inject(inferred_fields) do |accumulator, property|
accumulator[property.field] =
unless property.type.respond_to?(:dump)
- instance_variable_get(property.instance_variable_name)
+ property.get!(self)
else
- property.type.dump(instance_variable_get(property.instance_variable_name), property)
+ property.type.dump(property.get!(self), property)
end
accumulator
end).to_json

0 comments on commit eb67cb8

Please sign in to comment.
Something went wrong with that request. Please try again.