Skip to content
This repository
tag: 2.0.2

May 22, 2011

  1. Durran Jordan

    Bumping version to 2.0.2

    authored May 22, 2011

May 19, 2011

  1. Durran Jordan

    Adding in rdoc for fields method on criteria

    authored May 19, 2011
  2. Durran Jordan

    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.
    authored May 19, 2011
  3. Durran Jordan

    Updating rspec to over 2.6

    authored May 19, 2011

May 18, 2011

  1. Paul Elliott

    Update to latest and greatest generated rvmrc

May 12, 2011

  1. Durran Jordan

    Merge pull request #917 from sserdyuk/master

    Fix for a ruby 1.9 compatibility bug in dirty.rb
    authored May 12, 2011
  2. Durran Jordan

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

    Add Mongoid::Field.option for custom field options
    authored May 12, 2011
  3. Durran Jordan

    Merge pull request #916 from bernerdschaefer/master

    Minor tweaks to Mongoid::Paranoia
    authored May 12, 2011
  4. Bernerd Schaefer

    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
  5. Bernerd Schaefer

    Document.field returns the created Field object

May 11, 2011

  1. Sergei Serdyuk

    Minor spec updates

    authored May 11, 2011
  2. Sergei Serdyuk

    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
    authored May 11, 2011
  3. Durran Jordan

    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.
    authored May 11, 2011

May 10, 2011

  1. Durran Jordan

    Refactoring the observer spec

    authored May 10, 2011
  2. Bernerd Schaefer

    Use same time for attribute and update in #remove

  3. Bernerd Schaefer

    Remove extraneous self from Mongoid::Paranoia

May 09, 2011

  1. Durran Jordan

    Adding rdoc to observer, start refactor of spec

    authored May 09, 2011
  2. Durran Jordan

    Splitting out factory into a build and from_db methods

    authored May 09, 2011
  3. Durran Jordan

    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.
    authored May 09, 2011
  4. Durran Jordan

    Use #_vacant? instead of #blank? when raising document not found erro…

    …rs. Fixes #360.
    authored May 09, 2011
  5. Durran Jordan

    Adding in Object#vacant to avoid calls to Active Support's blank?

    authored May 09, 2011

May 05, 2011

  1. Durran Jordan

    Replace all instances of raw_attributes calls with attributes

    authored May 05, 2011
  2. Durran Jordan

    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.
    authored May 05, 2011
  3. Durran Jordan

    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.
    authored May 05, 2011
  4. Durran Jordan

    Merge pull request #887 from romanbsd/master

    Access attributes using a method, allows attributes overriding.
    authored May 05, 2011

May 03, 2011

  1. Konstantin Shabanov

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

    Fix typo in russian localization
    authored May 02, 2011

May 02, 2011

  1. Sergey Avseyev

    Fix typo in russian localization

    authored May 02, 2011

Apr 26, 2011

  1. Roman Shterenzon

    Access attributes using a method, allows attributes overriding.

    authored April 27, 2011

Apr 25, 2011

  1. Kieran Pilkington

    Removing extra whitespace

    authored April 26, 2011
  2. Chase Martyn

    fixing permissions on scripts files

    authored April 25, 2011 KieranP committed April 26, 2011
  3. adding tests to ensure persistence methods return false when callback…

    …s return false
    authored April 25, 2011 KieranP committed April 26, 2011
  4. adding code and spec to fix blindness to callbacks that return false …

    …during updates
    authored April 25, 2011 KieranP committed April 26, 2011

Apr 24, 2011

  1. Konstantin Shabanov

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

    …into cgriego-observers-rails31
    authored April 25, 2011

Apr 23, 2011

  1. Kieran Pilkington

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

    …nfiguration file contents
    authored April 23, 2011
  2. Kieran Pilkington

    Mongoid should generate a YAML file compatible with both Psych and Sy…

    …ck YAML parser (app only, tests rely on syck)
    authored April 23, 2011
Something went wrong with that request. Please try again.