namelessjon / merb_datamapper forked from merb/merb_datamapper
- Source
- Commits
- Network (6)
- Wiki (1)
- Graphs
-
Branch:
master
commit 48a89ac8d0022145f917d2d9f3922695818cae86
tree 1110b4d46077723e48b0cf10ac856ac54f0b26e6
parent a6f4265bc95027137e26962c455c4138cdcb716a
tree 1110b4d46077723e48b0cf10ac856ac54f0b26e6
parent a6f4265bc95027137e26962c455c4138cdcb716a
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Sun Nov 08 11:51:03 -0800 2009 | |
| |
Generators | Fri Oct 10 18:16:16 -0700 2008 | |
| |
LICENSE | Thu Oct 09 16:45:42 -0700 2008 | |
| |
README | Thu Nov 05 22:28:15 -0800 2009 | |
| |
Rakefile | ||
| |
TODO | Thu Oct 09 16:45:42 -0700 2008 | |
| |
lib/ | ||
| |
merb_datamapper.gemspec | Thu Nov 05 22:28:06 -0800 2009 | |
| |
spec/ | Thu Nov 05 19:44:58 -0800 2009 |
README
= merb_datamapper
A plugin for the Merb framework that provides DataMapper access
== Features
* Automatic connection to a data-store through DataMapper, via database.yml
* Easy use of multiple repositories.
* Generators for models, controllers and migrations.
* Sessions stored in a data-store managed by DataMapper
* wraps actions in DataMapper repository blocks, to enable the IdentityMap
=== Sessions
To use sessions:
1. set the session store to datamapper in init.rb:
Merb::Config.use { |c|
c[:session_store] = 'datamapper'
}
2. add the dependency in init.rb:
use_orm :datamapper
Sessions can be configured by a few plugin options:
[:session_storage_name] The name of the table to use to store the sessions (defaults to 'session')
[:session_repository_name] The repository to use for sessions. (defaults to <tt>:default</tt>)
=== Repository Blocks
Repository Blocks are a DataMapper feature, which enables the use of the
DataMapper IdentityMap, which can help with certain DataMapper features such as
strategic eager loading. Read on http://www.datamapper.org for more information
on these features.
If, for whatever reason, it doesn't suit you, it can be disabled via setting the
<tt>:use_reposity_block</tt> option to <tt>false</tt>.
Merb::Plugins[:merb_datamapper][:use_reposity_block] = false

