-
Notifications
You must be signed in to change notification settings - Fork 89
Open
Description
The problem is, the lib assumes that the errors hash is an activemodel hash if it responds to #to_hash and #full_messages. First there's nowhere in the lint spec from activel model regarding these methods, so it's a false assumption. Second, many objects implement #to_hash without arguments, and this gem assumes one hash argument with support for :full_messages key, which is also not part of the spec.
These assumptions make this gem fail for the sequel ORM, which is ActiveModel-compliant, has an errors object, but this doesn't support #to_hash with arguments.
I think the lib should add suport explicitly for active record error hashes and fallback to something else.
Metadata
Metadata
Assignees
Labels
No labels