apimaster 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'apimaster'
3
- s.version = '0.1.1'
3
+ s.version = '0.1.2'
4
4
  s.date = '2013-03-21'
5
5
  s.summary = "ApiMaster!"
6
6
  s.description = "A simple restful api framework."
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apimaster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: