Skip to content

Null dont get deleted when using array #193

Description

@ketuls

I am using couch-rest model gem and below is my snippet code.

class S
include CouchRest::Model::Embeddable
property :s1, String
property :s2, String
end

class P < CouchRest::Model::Base
property :name, String
property :xx, [S]
end

p =P.new
p.xx << S.new(s1: "S1 EXISTS")
p.xx << S.new(s2: "S2 EXISTS")
p.save

Now my doubt is when i do p.save "null" get stored in the couchdb, which I dont want. If i don't use array, then null gets auto deleted , I want the same feature for the array as well.

Can you please suggest something?
screen shot 2015-05-15 at 7 31 21 pm

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions