#1521 new
Tillsc

Database exceptions should be pushed to the errors

Reported by Tillsc | August 12th, 2011 @ 05:24 AM

When an object is valid but the save fails the reason why this happened is often missing. So with dm 1.1 I often had the following scenario:

  foo.valid? #=> true
  foo.save #=> false
  foo.errors #=> []

I think it would be a great improvement if the original error message dropped by the database adapter would be part of the errors hash. E.g.:

  foo.valid? #=> true
  foo.save #=> false
  foo.errors #=> [:database => "Duplicate entry '0' for key 'bar'"]

Comments and changes to this ticket

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