class ApplicationController < ActionController::Base
  protect_from_forgery
  layout 'application'
end

require 'dm-rails/middleware/identity_map'

class ApplicationController < ActionController::Base
  use Rails::DataMapper::Middleware::IdentityMap
  protect_from_forgery
  layout 'application'
end

Use Identity Map middleware in ApplicationController
Use Identity Map middleware in ApplicationController

This is necessary as of dm-rails http://is.gd/cNc3z
