<commit_before># Overview

For instructions on upgrading to newer versions, visit
[mongoid.org](http://mongoid.org/en/mongoid/docs/upgrading.html).

## 3.1.0 (branch: master)

### New Features

* \#2669 Passing a block to `Criteria#new` now properly sends the
  block through to the model's contructor. (Arthur Neves)

* \#2613 Procs can now be provided as values to `store_in`:

        class Band
          include Mongoid::Document
          store_in database: ->{ Thread.current[:database] }
        end

* \#2609 Pass through batch_size option to query. (<NAME>)

* \#2539 `Mongoid.models` now tracks all models in the application for more
  accurate determination of models for things such as indexing rake tasks.
  (<NAME>)

* \#2525 Added the ability to have short timestamped fields with aliases. This
  sets timestamp fields as `c_at` and `u_at` that are also aliased as
  `created_at` and `updated_at` for convenience. (<NAME>)

        class Band
          include Mongoid::Document
          include Mongoid::Timestamps::Short # For c_at and u_at.
        end

        class Band<commit_msg>Update changelog<commit_after># Overview

For instructions on upgrading to newer versions, visit
[mongoid.org](http://mongoid.org/en/mongoid/docs/upgrading.html).

## 3.1.0 (branch: master)

### New Features

* \#2669 Passing a block to `Criteria#new` now properly sends the
  block through to the model's contructor. (Arthur Neves)

* \#2657 Logger getter and setter convenience methods have been
  added to the `Config` module. (Arthur Neves)

* \#2613 Procs can now be provided as values to `store_in`:

        class Band
          include Mongoid::Document
          store_in database: ->{ Thread.current[:database] }
        end

* \#2609 Pass through batch_size option to query. (<NAME>)

* \#2539 `Mongoid.models` now tracks all models in the application for more
  accurate determination of models for things such as indexing rake tasks.
  (<NAME>)

* \#2525 Added the ability to have short timestamped fields with aliases. This
  sets timestamp fields as `c_at` and `u_at` that are also aliased as
  `created_at` and `updated_at` for convenience. (<NAME>)

        class Band
          include Mongoid::Document
          include Mongoid::Timestamps::Short # For c_at and u_at.
        end

        class Band
{'fraction_non_alphanumeric': 0.09040034438226431, 'fraction_numerical': 0.02152389151958674, 'mean_word_length': 3.240875912408759, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6759412', 'n_tokens_mistral': 727, 'n_tokens_neox': 664, 'n_words': 268}