MongoMapper v0.15.1 Release Notes

Release Date: 2020-10-03 // about 1 year ago
  • ✨ Enhancements:

    * PR-649 Chris Heald <[email protected]> Add StrongParameters plugin. Not included by default.
    * PR-615 Kenichi Kamiya <[email protected]> Return an Enumerator on #find_each when not given a block
    * PR-598 Scott Taylor <[email protected]> Allow incrementing + decrementing using only the field name (example: `obj.increment(:my_counter)`)
    * PR-593 Scott Taylor <[email protected]> Add sorting with :ordered => true for has_many :in => :array (Closes #428)
    * PR-523 Shevaun Coker <[email protected]> Add `assign_attributes` "alias" method for `attributes=`
    * PR-259 Hubert <[email protected]> Add Inverse Many to Many associations.  Example:
    
        class List
          include MongoMapper::Document
    
          key :name, String, required: true
          key :user_ids, Array
    
          many :users, in: :user_ids
        end
    
        class User
          include MongoMapper::Document
    
          key :name, String, required: true
    
          many :lists, from: :user_ids, as: :user
        end
    
    * Support ruby 2.7.2
    

    🐛 Bug Fixes:

    * PR-640 Seth Jeffery <[email protected]> Fix find! with a one item array to return a one item array object
    * PR-628 jamieorc <[email protected]> Corrected a regression on Set keys with typecast
    * PR-611 SteffanPerry <[email protected]> Missing yaml requirement was throwing error on rail 4.2.1: "uninitialized constant MongoMapper::Railtie::YAML (NameError)"
    * Add `attributes` to reserved keys
    * Fix infinite regression with duplicate assignment to belongs_to proxy
    

    🛠 Doc Fixes:

    * PR-650 Olle Jonsson <[email protected]> README: SVG badges
    * PR-660 Kenichi Kamiya <[email protected]> Fix indent
    * PR-617 Kenichi Kamiya <[email protected]> Update types to follow Symbol support
    * PR-616 Kenichi Kamiya <[email protected]> Remove an unused spec
    

Previous changes from v0.15.0

  • * Upgrade to use modern mongo by upgrading to use the mongo 2.0 driver.
    
      This update means MongoMapper should work with any version of mongo after (2.6+).
    
      Many thanks to Frederick Cheung <[email protected]> for his contribution.
    
      Note that MyModel.collection now returns a mongo 2.0 driver collection object which does not mirror the shell methods.
    
      Patches welcome for a compatibility layer!
    
    * Support for ruby 2.4+, rails 5.0+
    * Dropping support for all older rubies, older rails.