Permalink
Commits on Feb 18, 2010
  1. Adding first round of convenience methods for connecting from Rails. …

    …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
    jnunemaker committed with Karl Feb 9, 2010
Commits on Feb 3, 2010
Commits on Feb 1, 2010
  1. named scopes

    fauxparse committed Feb 1, 2010
  2. move scopes into a plugin

    fauxparse committed Feb 1, 2010
Commits on Jan 31, 2010
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…

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

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

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

    …ethods (create!, save! etc.) to just have :safe on by default. Fixes #166.
    jnunemaker committed Jan 24, 2010
Commits on Jan 23, 2010
  1. Added configure to plugins. This allows you to modify the model addin…

    …g the plugin without needed to do an included hook in InstanceMethods.
    jnunemaker committed Jan 23, 2010
  2. Merge branch 'vandrijevik/master'

    Conflicts:
    	lib/mongo_mapper/plugins/identity_map.rb
    jnunemaker committed Jan 23, 2010