datamapper_hacks.rb

Path: lib/autumn/datamapper_hacks.rb
Last Update: Sat Feb 23 07:11:30 +0000 2019

A set of hacks to make DataMapper play more nicely with classes within modules.

Methods

Public Class methods

Public Instance methods

HACK Determine the child key from the given repository, not the default one.

 Updates this method to take a repository name. The child key will be
 determined from the properties scoped to the given repository.

 The @child_key class variable is changed to a hash that maps repository
 names to the appropriate key.

HACK Determine the parent key from the given repository, not the default one.

 Updates this method to take a repository name. The parent key will be
 determined from the properties scoped to the given repository.

 The @parent_key class variable is changed to a hash that maps repository
 names to the appropriate key.

HACK Determine the child key from the given repository, not the default one.

 Updates this method to use the hacked child_key method.

[Validate]