fabrik42/acts_as_api — pull request #66 by nanocity (2012-07-04 14:42:03+00:00)
Title: api_root_name returning a Symbol with Mongoid 3

Mongoid::Criteria.collection_name returns a symbol in Mongoid 3.0.

This cause an exception in rendering when api_root_name is obtained from that method and underscore method is called. A simple to_s method fixed it.

PR includes some extra code because I was not able to run the test. Apparently routes from shared engine do not load correctly. I found a solution here ( https://gist.github.com/2483830 ).

Also I had to update the dummy mongoid application to 3.0.0.rc. I would have liked to create a new one in order not to remove the test for 2.X.X series but I can get a working Gemfile with two Mongoid versions installed. If anyone knows how to do it I will add some commits.

The fix is so simple it can be merged without new tests I think but I needed a red test case.