This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
No gems have been built for this project yet.
dm-more / dm-shorthand
| name | age | message | |
|---|---|---|---|
| .. | |||
| |
History.txt | Fri Jul 18 12:02:56 -0700 2008 | [Bernerd Schaefer] |
| |
LICENSE | Mon Jun 09 07:24:12 -0700 2008 | [david] |
| |
Manifest.txt | Fri Jul 18 12:02:56 -0700 2008 | [Bernerd Schaefer] |
| |
README.txt | Fri Jul 18 12:02:56 -0700 2008 | [Bernerd Schaefer] |
| |
Rakefile | Sun Sep 14 11:27:00 -0700 2008 | [dkubb] |
| |
TODO | Mon Jun 09 07:24:12 -0700 2008 | [david] |
| |
lib/ | Tue Aug 26 15:25:51 -0700 2008 | [bernerdschaefer] |
| |
spec/ | Mon Jun 09 13:31:08 -0700 2008 | [bernerdschaefer] |
README.txt
= dm-shorthand
DataMapper plugin providing shortcut usage of models in multiple repositories.
When using this plugin, every time you define a new model M, a method with the same
name as the model is defined inside the module where you defined M.
== Example
Let's say you have repositories :default, :one and :two.
class MyModel
include DataMapper::Resource
property :a, String
property :b, String
end
This will allow you to operate on those repositories like this:
# create a new instance of MyModel in repository :one
MyModel(:one).create(:a => "a's value!", :b => "b's value!")
# fetch the MyModel instance with id == 1 from repository :two
MyModel(:two)[1]
# instantiate a new MyModel instance with its default repository
# set to :default
m = MyModel.new




