lib/ohm.rb in ohm-3.0.1 vs lib/ohm.rb in ohm-3.0.2

- old
+ new

@@ -13,11 +13,11 @@ # All of the known errors in Ohm can be traced back to one of these # exceptions. # # MissingID: # - # Comment.new.id # => Error + # Comment.new.id # => nil # Comment.new.key # => Error # # Solution: you need to save your model first. # # IndexNotFound: @@ -1332,13 +1332,13 @@ # u.kind_of?(User) # # => true # def save indices = {} - model.indices.each { |field| indices[field] = Array(send(field)) } + model.indices.each { |field| indices[field] = Array(send(field)).map(&:to_s) } uniques = {} - model.uniques.each { |field| uniques[field] = send(field) } + model.uniques.each { |field| uniques[field] = send(field).to_s } features = { "name" => model.name }