Skip to content

Instantly share code, notes, and snippets.

@tpitale
Created March 10, 2013 19:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tpitale/5130038 to your computer and use it in GitHub Desktop.
Save tpitale/5130038 to your computer and use it in GitHub Desktop.
Initializer to include support for ActiveModel::Serializers within DataMapper
require 'dm-core'
DataMapper::Model.append_inclusions(ActiveModel::SerializerSupport)
DataMapper::Collection.send(:include, ActiveModel::ArraySerializerSupport)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment