Permalink
Commits on Feb 10, 2010
  1. Version bump to 0.7.0

    jnunemaker committed Feb 10, 2010
  2. I really don't like reflection. Switched back to association which fe…

    jnunemaker committed Feb 10, 2010
    …els way more obvious to me.
  3. Minor: refactoring query.

    jnunemaker committed Feb 10, 2010
Commits on Feb 9, 2010
  1. Added all query modifier. Refactored finder options and symbol operat…

    jnunemaker committed Feb 9, 2010
    …ors. Also, fixed normalizing value when using symbol operators.
  2. Indexes are once again created when model is loaded instead of storin…

    jnunemaker committed Feb 9, 2010
    …g them up and creating using MongoMapper.ensure_indexes!.
    
    Removed all the MM.ensure_index and ensure_indexes! methods as they are no longer needed.
    If you were using those, update to ensure_index on the model or :index => true on the key.
  3. Adding first round of convenience methods for connecting from Rails. …

    jnunemaker committed Feb 9, 2010
    …Can now be something like this:
    
      MongoMapper.setup(YAML.load(Rails.root.join('config', 'database.yml')), Rails.env, {
        :logger    => Rails.logger),
        :passenger => true,
      })
    
    Instead of the much more verbose:
    
      config = YAML.load_file(Rails.root + 'config' + 'database.yml')[Rails.env]
    
      MongoMapper.connection = Mongo::Connection.new(config['host'], config['port'], :logger => Rails.logger)
      MongoMapper.database = config['database']
    
      if config['username'].present?
        MongoMapper.database.authenticate(config['username'], config['password'])
      end
    
      if defined?(PhusionPassenger)
        PhusionPassenger.on_event(:starting_worker_process) do |forked|
          MongoMapper.connection.connect_to_master if forked
        end
      end
Commits on Feb 5, 2010
Commits on Feb 4, 2010
  1. Renamed find_or_create to first_or_create which is more accurate. Add…

    jnunemaker committed Feb 4, 2010
    …ed first_or_new. Tweaked destroy_all to use find_each.
  2. Private change: Renamed assign_root_document to assign_references as …

    jnunemaker committed Feb 4, 2010
    …it has more than one responsibility now.
Commits on Jan 29, 2010
Commits on Jan 28, 2010
  1. Updated to mongo 0.18.3. Overwrote Mongo::ObjectID#to_json to be more…

    jnunemaker committed Jan 28, 2010
    … friendly for most people and aliased ruby driver to original_to_json.
  2. Added :protected shortcut to key definition. Also added tests to make…

    jnunemaker committed Jan 28, 2010
    … sure the SCI works fine with protected attributes.
  3. Change key validation shortcut :within to :in, and add test to ensure…

    chanks committed with jnunemaker Jan 23, 2010
    … it works on embedded documents.
Commits on Jan 24, 2010
  1. save! now takes options so you can pass safe in. Might switch the ! m…

    jnunemaker committed Jan 24, 2010
    …ethods (create!, save! etc.) to just have :safe on by default. Fixes #166.