On Mar 9, 2009, at 1:53 PM, James Byrne wrote:
Pat Maddox wrote:
ActiveRecord doesn't know anything about db constraint errors. If
one
is violated, the error propagates up in the form of an exception.
I realize that, but the exception is of the
ActiveRecord:StatementInvalid class, which I should be able to catch
in
the controller with a rescue clause. But, I am not getting this to
work
at the moment.
Not sure what your problem is. Here's a gist that demonstrates what
you're trying to do, and works fine. http://gist.github.com/76667
Pat
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users