Created
March 2, 2012 17:40
-
-
Save benedikt/1959907 to your computer and use it in GitHub Desktop.
Makes mongoid and active_model_serializers play nicely together
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/initializers/active_model_serializers.rb | |
Mongoid::Document.send(:include, ActiveModel::SerializerSupport) | |
Mongoid::Criteria.delegate(:active_model_serializer, :to => :to_a) |
Awesome.. thanks!
I wasted a lot of time just for this.
Thank you.
Thank you!
GJ!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
many thanks!