Martin and anyone else interested: I've done a bit of work today on getting DM to pass tests on devise [1]. The majority of the remaining failing tests fall into the following two categories:
1. DateTime properties in DM verses Time attributes in AR. Specifically, tests raise an error when trying to call #gmtime on a DateTime object (as opposed to Time); at least one test also checks that the attribute is_kind_of? Time. 2. Translations of validation messages. When devise adds errors to a resource, it gives the message argument as a symbol. In AR (actually, I think it's in ActiveModel), a symbol cues it to perform a translation, whereas DM keeps the symbol as is. The devise tests check against the expected translated string, so DM fails these tests. I'm inclined to think the best approach here would be to have devise handle all translations directly instead of relying on the ORM--I'll probably open a ticket on devise to discuss that possibility, but wondered if anyone has thoughts on if there's a reasonable way to have DM translate the validation errors (Maybe using DM::V::ValidationErrors.default_error_messages= ?). If anyone has thoughts on the best ways to address these two issues, I'd appreciate it. Thanks snusnu for getting the tests running! Jared Morgan [1] http://github.com/jm81/devise/tree/dm-compatibility On Jun 17, 7:53 pm, Martin Gamsjaeger <[email protected]> wrote: > Hey guys, > > I thought I'd let everyone know that devise-1.1 will be released very > soon (like 1-2 weeks from now) and Jose Valim explicitly called out to > different ORM users to provide patches to make devise compatible with > everyone's ORM of choice. Surely we want DM to be compatible with > devise since it's a very popular authentication solution for rails > (built on warden and thus rack) that many people trying to make the > switch from AR to DM on rails3 will want to keep on using. -- You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/datamapper?hl=en.
