apimaster 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/apimaster.gemspec +1 -1
- data/lib/apimaster/mapper.rb +1 -1
- metadata +1 -1
data/apimaster.gemspec
CHANGED
data/lib/apimaster/mapper.rb
CHANGED
@@ -61,7 +61,7 @@ module Apimaster
|
|
61
61
|
fields.each do |field|
|
62
62
|
if self.respond_to?(field)
|
63
63
|
val = self.send(field)
|
64
|
-
record[field] = val.respond_to?(:to_hash) ? val.to_hash(accessor) : val
|
64
|
+
record[field] = (val.respond_to?(:to_hash) and not val.is_a?(Hash)) ? val.to_hash(accessor) : val
|
65
65
|
else
|
66
66
|
raise "Dataset #{self.class} has no method with the name of #{field}"
|
67
67
|
end
|