Skip to content
Commits on May 22, 2011
  1. @durran

    Adding in warning for use of slave databases - replica sets should be…

    … used from now on.
    durran committed May 22, 2011
  2. @durran

    Bumping version to 2.0.2

    durran committed May 22, 2011
Commits on May 19, 2011
  1. @durran
  2. @durran

    Allowing Criteria#only and Criteria#without to work within named scopes:

    - 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.
    durran committed May 19, 2011
  3. @durran

    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. @durran

    Merge pull request #917 from sserdyuk/master

    Fix for a ruby 1.9 compatibility bug in dirty.rb
    durran committed May 12, 2011
  2. @durran

    Merge pull request #921 from bernerdschaefer/custom-field-options

    Add Mongoid::Field.option for custom field options
    durran committed May 12, 2011
  3. @durran

    Merge pull request #916 from bernerdschaefer/master

    Minor tweaks to Mongoid::Paranoia
    durran committed May 12, 2011
  4. @bernerdschaefer

    Add Mongoid::Field.option for custom field options

    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 field.name if required
        end
    
    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
            fields.select { |field| field.options[:required] }
          end
        end
    
    2. Mass Assignment
    
        Mongoid::Field.option :accessible do |model, field, accessible|
          model.attr_accessible field.name if accessible
        end
    
    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)]
        end
    
        Mongoid::Field.option :aliases do |model, field, aliases|
          aliases.each do |new_name|
            model.alias_attribute new_name, field.name
          end
        end
    bernerdschaefer committed May 12, 2011
  5. @bernerdschaefer
Commits on May 11, 2011
  1. @sserdyuk

    Minor spec updates

    sserdyuk committed May 11, 2011
  2. @sserdyuk

    Fixes ruby 1.9 compatibility bug where ::instance_methods was only ch…

    …ecked with string values and resulted existing methods overwritten with mongoid 'dirty' helper methods
    sserdyuk committed May 11, 2011
  3. @durran

    Fixing update_attribute performance when same value provided:

    - 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.
    durran committed May 11, 2011
Commits on May 10, 2011
  1. @durran

    Refactoring the observer spec

    durran committed May 10, 2011
  2. @bernerdschaefer
  3. @bernerdschaefer
Commits on May 9, 2011
  1. @durran
  2. @durran
  3. @durran

    Slight reworking of the way the factory instantiates documents:

    - 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.
    durran committed May 9, 2011
  4. @durran
  5. @durran
Commits on May 5, 2011
  1. @durran
  2. @durran

    As far as attributes are concerned, we consume our own API internally:

    - Slap on the wrist to me for not adhering to this basic OO principle
      earlier. Need to make sure the entire codebase does this.
    durran committed May 5, 2011
  3. @durran

    Document#attributes no longer returns a HashWithIndifferentAccess:

    - This is consistent with AR in that all keys in the attributes hash are
      strings.
    - Document#raw_attributes will still return the same hash.
    durran committed May 5, 2011
  4. @durran

    Merge pull request #887 from romanbsd/master

    Access attributes using a method, allows attributes overriding.
    durran committed May 5, 2011
Commits on May 3, 2011
  1. @etehtsea

    Merge pull request #897 from avsej/patch-1.

    Fix typo in russian localization
    etehtsea committed May 2, 2011
Commits on May 2, 2011
  1. @avsej

    Fix typo in russian localization

    avsej committed May 2, 2011
Commits on Apr 26, 2011
  1. @romanbsd
Commits on Apr 25, 2011
  1. @KieranP

    Removing extra whitespace

    KieranP committed Apr 26, 2011
  2. @cmartyn @KieranP
  3. @KieranP

    adding tests to ensure persistence methods return false when callback…

    …s return false
    Chase Martyn committed with KieranP Apr 25, 2011
  4. @KieranP

    adding code and spec to fix blindness to callbacks that return false …

    …during updates
    Chase Martyn committed with KieranP Apr 25, 2011
Commits on Apr 24, 2011
  1. @etehtsea

    Merge branch 'observers-rails31' of https://github.com/cgriego/mongoid

    …into cgriego-observers-rails31
    etehtsea committed Apr 25, 2011
Commits on Apr 23, 2011
  1. @KieranP

    Forcing tests to use Syck YAML parser and reorganise app generated co…

    …nfiguration file contents
    KieranP committed Apr 23, 2011
Something went wrong with that request. Please try again.