Skip to content
This repository

Aug 07, 2010

  1. Martin Gamsjaeger

    Include the ControllerRuntime helper like AR does

    snusnu authored
  2. Martin Gamsjaeger

    Copy the way how AR attaches its LogSubscriber

    snusnu authored

Jun 27, 2010

  1. Jared Morgan

    LogSubscriber inherits from ActiveSupport::LogSubscriber

    Rails' LogSubscriber has moved to ActiveSupport.
    
    See http://is.gd/d5BwH
    jm81 authored snusnu committed

Jun 13, 2010

  1. Martin Gamsjaeger

    Allow more control over the identity map usage

    This commit completely removes any IM related setup
    code from dm-rails. It's much more flexible to just
    rely on rails controller API that allows you to add
    any rack middleware for that controller only.
    
    So in order to enable the IM for any specific
    controller, you only need to make sure that the
    provided middleware is available by requiring it
    
      require 'dm-rails/middleware/identity_map'
    
    Then you can enable it by adding the following
    call in your controller's class.
    
      use Rails::DataMapper::Middleware::IdentityMap
    
    Obviously, if you want to enable the IM for all
    controllers by default, you can simply stick the
    above lines into application_controller.
    snusnu authored

May 18, 2010

  1. Martin Gamsjaeger

    Use #to_prepare hooks for properly reloading models

    This should ideally fix most of the reloading issues
    that previously occured mostly in development mode.
    
    The way it works now, is the following:
    
    Production mode:
    All models are required once on application bootup
    and all FK properties get initialized. Subsequent
    request won't reload the models.
    
    Development mode:
    All models are required once on application bootup
    and all FK properties get initialized. Subsequent
    requests will do the same before being processed.
    snusnu authored

Mar 30, 2010

  1. Martin Gamsjaeger

    Use a Benchmarking mixin instead of an Adapter wrapper

    This patch completely drops the use of the adapter
    cascade along with adapter wrappers.
    
    This will hopefully work around the problems with
    transactions and migrations, which both need real
    AbstractAdapter descendants to work. The previous
    adapter wrappers were'nt properly recognized which
    basically rendered transactions and migrations
    useless for the sake of being able to display some
    benchmarking information in rails' server logs.
    
    This patch should get around that by only extending
    the adapter behavior with our benchmarking needs,
    instead of wrapping it in a new object that's not
    a descendant of AbstractAdapter.
    
    Thx to Xavier Shay for the idea!
    
    In the hopefully not so longterm, the benchmarking
    mixin will go away anyway, because (at least) the
    DO adapters will provide useful benchmarking info
    by means of passing a struct containing the info
    to a Connection#log(info) method that's defined in
    ruby instead of only in the native driver
    implementations (as is the case currently).
    snusnu authored

Mar 26, 2010

  1. Martin Gamsjaeger

    Don't forget about Patrik's patch!

    snusnu authored
  2. Martin Gamsjaeger

    Set config.data_mapper to our very own object

    This was made possible in http://is.gd/b0MA0
    Previously the "toplevel" railtie config key was
    specified by
    
      railtie_name :data_mapper
    
    which forced us to put our custom configuration
    object into
    
      config.data_mapper.configuration
    snusnu authored

Mar 01, 2010

  1. Use require_dependency to preload models and lib

    When STI is used for models the auto-require feature
    of active_support may require a parent model when
    requiring a child model before preload_models then
    requires the same parent model again causing the
    descendants of the parent to get corrupted and
    relationship properties in the children end up not
    getting defined correctly.
    
    Maybe this could get fixed in dm-core? Sounds like
    something weird is going on when STI related classes
    are required/loaded twice? To be honest, I don't
    exactly understand what's going on here, but Patrik
    confirms that this patch fixes / works around the
    STI issues.
    Patrik Sundberg authored snusnu committed

Feb 23, 2010

  1. Martin Gamsjaeger

    Rely on AMo#to_param instead of providing our own

    snusnu authored
  2. Martin Gamsjaeger

    Refer to dm-rails throughout the code

    snusnu authored
Something went wrong with that request. Please try again.