[Rails] MongoMapper on Rails 3 Master, Undefined 'to_key' Method

| 1 min read

Rails 3 has recently renamed key method to to_key, which consequently rendered MongoMapper unusable.

You might see an error that looks like:

ActionView::Template::Error (undefined method `to_key' for #<Post:0x000001066e4020>)

After some twiddling I’ve submitted a patch to address this issue. Feel free to pull my fork until the fix makes its way into John Nunemaker’s main repository.

Enjoy what you are reading? Sign up for a better experience on Persumi.