#1143 new
PreciousBodilyFluids

Unable to use error_messages form helper with rails_datamapper.

Reported by PreciousBodilyFluids | December 2nd, 2009 @ 04:06 PM

While using Datamapper in a Rails 2.3 app, the error_messages helper wouldn't work with a DataMapper object:

undefined method count' for {}:Dictionary

I was able to fix it by defining:

class Dictionary
alias_method :count, :length end

Thanks to namelessjon in IRC.

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Pages