Class Mack::DataMapper::RepositoryRunnerHelper
In: lib/mack-data_mapper/repo_runner_helper.rb
Parent: Mack::RunnerHelpers::Base

This runner helper will wrap a request with a DataMapper::Repository. To turn on this runner set the following configuration value equal to true:

  configatron.mack.data_mapper.use_repository_runner = true

To set the context in which the runner helper runs, set this configuration value:

  configatron.mack.data_mapper.repository_runner_context = :default

Methods

complete   start  

Public Instance methods

[Source]

    # File lib/mack-data_mapper/repo_runner_helper.rb, line 14
14:       def complete(request, response, cookies)
15:         ::DataMapper::Repository.context.pop
16:       end

[Source]

    # File lib/mack-data_mapper/repo_runner_helper.rb, line 10
10:       def start(request, response, cookies)
11:         ::DataMapper::Repository.context << ::DataMapper::Repository.new(configatron.mack.data_mapper.repository_runner_context)
12:       end

[Validate]