From 8e4ad4d487535021847fd9ce0f7adb710a071ea9 Mon Sep 17 00:00:00 2001 From: "Peter Savichev (proton)" Date: Tue, 6 Nov 2018 20:46:25 +0100 Subject: [PATCH] changes hash syntax in README examples --- README.rdoc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.rdoc b/README.rdoc index 422d28a..4c6cf44 100644 --- a/README.rdoc +++ b/README.rdoc @@ -32,20 +32,20 @@ You can add more than one auto-incremented field per model. === Options - auto_increment :sequence, :collection => :some_collection + auto_increment :sequence, collection: :some_collection mongoid_auto_inc keeps track of the current number in the sequence by creating a separate document mongoDB to query and update. By default auto_increment will save this document to a mongoDB collection called sequences. If you wish to save to a different collection use the :collection option to specify its name. - auto_increment :sequence, :step => 5 + auto_increment :sequence, step: 5 If desired, you can override the :step, or increment amount (default is 1). - auto_increment :sequence, :seed => 3333 + auto_increment :sequence, seed: 3333 -Use the :seed option to set the initial value of the auto-incremented field. The first number assigned from the sequence will be the next number after the seed value (including the step - so for :seed => 1000, :step => 5, first value will be 1005). +Use the :seed option to set the initial value of the auto-incremented field. The first number assigned from the sequence will be the next number after the seed value (including the step - so for seed: 1000, step: 5, first value will be 1005). - auto_increment :sequence, :scope => :some_field_or_relation - auto_increment :sequence, :scope => [ :some_field_or_relation, :another_field_or_relation ] + auto_increment :sequence, scope: :some_field_or_relation + auto_increment :sequence, scope: [ :some_field_or_relation, :another_field_or_relation ] Use the :scope option to scope an auto-incremented field to a query. Similar to Mongoid, the scope may contain one or many fields or relations. Each unique scope will result in it's own stream of incremented values. @@ -67,7 +67,7 @@ Use the :scope option to scope an auto-incremented field to a query. S == Copyright -(c) 2011 Peter Savichev (proton) +(c) 2011-2018 Peter Savichev (proton) (c) 2010-2011 Jeff Smith See LICENSE.txt for further details.