Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-4077

Unable to set w: :majority as validator isn't accepting symbols

    • Type: Icon: Task Task
    • Resolution: Done
    • 5.0.0
    • Affects Version/s: None
    • Component/s: None
    • None

      I'm using options exactly per docs, at http://mongoid.org/en/mongoid/docs/installation.html

      options:
      read: :secondary
      write:
      w: :majority

      Error is:

      /Volumes/Data/Apps/sardel/shared/bundle/ruby/2.2.0/gems/optionable-0.2.0/lib/optionable/validator.rb:50:in `validate!':

      {"w"=>:majority}

      is not acceptable for option :write. Valid values are: {:w=>any Integer},

      {"w"=>any Integer}

      , {:w=>any String},

      {"w"=>any String}

      , {:j=>true},

      {"j"=>true}

      , {:j=>false},

      {"j"=>false}

      , {:fsync=>true},

      {"fsync"=>true}

      , {:fsync=>false},

      {"fsync"=>false}

      . (Optionable::Invalid)

      Workaround: using a string (majority) rather than a symbol (:majority)

            Assignee:
            Unassigned Unassigned
            Reporter:
            paulmakepeace Paul Makepeace
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: