Commits on Jun 5, 2011
  1. Removal of traditional slave support from Mongoid:

    durran committed May 22, 2011
    - Replica sets should be used in place of traditional master and slave
  2. Remove unused code

    durran committed Jun 5, 2011
  3. Resolving issues between specs in #733 and #834:

    durran committed Jun 5, 2011
    - There were 2 differences of opinion between the two pull requests.
      #733 assumed that a replacement or delete operation on documents that
      were already persisted hits the database on for all affected docs,
      where #834 assumed no persistence on a delete would happen. The first
      is correct and consistent with the way Mongoid behaves when documents
      are already persisted - therefore removed the extra code and
      irrelevant specs from #834.
  4. Merge pull request #874 from nickhoffman/issue_836

    durran committed Jun 5, 2011
    Deleting from a M-M reference is one-sided
  5. Merge pull request #733 from davekrupinski/master

    durran committed Jun 5, 2011
    Fix inconsistent state when replacing an entire many to many relation
Commits on Jun 4, 2011
Commits on May 27, 2011
  1. removed trailing whitespaces

    etehtsea committed May 27, 2011
Commits on May 23, 2011
  1. Whitespace cleanup

    durran committed May 23, 2011
Commits on May 22, 2011
  1. Adding in warning for use of slave databases - replica sets should be…

    durran committed May 22, 2011
    … used from now on.
  2. Bumping version to 2.0.2

    durran committed May 22, 2011
Commits on May 19, 2011
  1. Allowing Criteria#only and Criteria#without to work within named scopes:

    durran committed May 19, 2011
    - When fusing the criteria through scopes it was passing through method
      missing on the criteria to the class on #fields, getting a
      not-so-obvious wrong number of arguments error. This is now resolved.
  2. Updating rspec to over 2.6

    durran committed May 19, 2011
Commits on May 18, 2011
  1. Update to latest and greatest generated rvmrc

    Paul Elliott committed May 18, 2011
Commits on May 12, 2011
  1. Merge pull request #917 from sserdyuk/master

    durran committed May 12, 2011
    Fix for a ruby 1.9 compatibility bug in dirty.rb
  2. Merge pull request #921 from bernerdschaefer/custom-field-options

    durran committed May 12, 2011
    Add Mongoid::Field.option for custom field options
  3. Merge pull request #916 from bernerdschaefer/master

    durran committed May 12, 2011
    Minor tweaks to Mongoid::Paranoia
  4. Add Mongoid::Field.option for custom field options

    bernerdschaefer committed May 12, 2011
    This allows users of Mongoid to define custom field options, and execute
    handlers when that option is provided.
    A few use-cases spring to mind:
    1. Auto-validations
    It should be (fairly) trivial to implement field-level validations like
    DataMapper and ActiveRecord, with the most trivial example looking
    something like this.
        Mongoid::Field.option :required do |model, field, required|
          model.validates_presence_of if required
    Now the block will be executed whenever a field is defined that includes
    the key `:required` in its options:
        Person.field :name, required: true
        Person.field :age, required: false
    All options provided are still stored on the Field, which should also
    allow for a richer level of introspection:
        class Person
          def required_fields
   { |field| field.options[:required] }
    2. Mass Assignment
        Mongoid::Field.option :accessible do |model, field, accessible|
          model.attr_accessible if accessible
    3. Re-writing option values, and other uses
        # Turn :alias => :city into :alias => [:city]
        Mongoid::Field.option :alias do |model, field|
          field.options[:aliases] = [*field.options.delete(:alias)]
        Mongoid::Field.option :aliases do |model, field, aliases|
          aliases.each do |new_name|
            model.alias_attribute new_name,
Commits on May 11, 2011
  1. Minor spec updates

    sserdyuk committed May 11, 2011
  2. Fixes ruby 1.9 compatibility bug where ::instance_methods was only ch…

    sserdyuk committed May 11, 2011
    …ecked with string values and resulted existing methods overwritten with mongoid 'dirty' helper methods
  3. Fixing update_attribute performance when same value provided:

    durran committed May 11, 2011
    - There is no need to attempt to go through the save chain when the
      attribute has not changed. The previous change to this had killed
      performance in that situation, this commit restores it.
Commits on May 10, 2011
  1. Refactoring the observer spec

    durran committed May 10, 2011
Commits on May 9, 2011
  1. Slight reworking of the way the factory instantiates documents:

    durran committed May 9, 2011
    - The builders and creators now call the factory directory.
    - The relation builders no longer handle hash input.
    - Instantiating documents from the db without ids does not generate new
      ones. Fixes #518.