Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Rails Plugin for DataMapper
Ruby
Failed to load latest commit information.
generators [dm-more] Bumped version to 0.10.3
lib Remove unused extension.
tasks [rails_datamapper] Removed unecessary rake tasks
.gitignore Ignore all Gemfile variants apart from the original
Gemfile Upate Gemfile to be more consistent with other projects
LICENSE [dm-more] Converted to use Jeweler
README.rdoc
Rakefile Updated jeweler dep to 1.5.2
VERSION Version bump to 1.0.2
datamapper.rake [dm-more] Bumped version to 0.10.3
rails_datamapper.gemspec Updated jeweler dep to 1.5.2

README.rdoc

This is a legacy gem, that provides rails 2.x support for DataMapper. Those looking to use DataMapper with Rails3 should use dm-rails which can be found at github.com/datamapper/dm-rails

Setup

add the following line to your projects environment.rb

config.gem “rails_datamapper”

Generators

This will install the datamapper rake tasks:

script/generate dm_install

Three generators are added by default

script/generate dm_model script/generate rspec_dm_model script/generate dm_migration

The first two add a migration but you can call

script/generate dm_model –skip-migration script/generate rspec_dm_model –skip-migration

To avoid any dependency on active record add this to your projects environment.rb

config.frameworks -= [ :active_record ]

Session Store

Change config/initializers/session_store.rb to something like the following:

ActionController::Base.session_store = :data_mapper_store ActionController::Base.session = {

:expires_after => 7.days,
:key           => '_session_id',

}

Then create the sessions table with: rake db:sessions:create

Something went wrong with that request. Please try again.