Permalink
Browse files

Correct the namespace of the exceptions classes

RecordNotUnique and InvalidForeignKey live in the ActiveRecord module
  • Loading branch information...
1 parent d489cfb commit 9e246f712242086d03b4113f43c0475159523701 Bob Cotton committed Apr 8, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/arjdbc/postgresql/adapter.rb
@@ -557,9 +557,9 @@ def tables
def translate_exception(exception, message)
case exception.message
when /duplicate key value violates unique constraint/
- RecordNotUnique.new(message, exception)
+ ::ActiveRecord::RecordNotUnique.new(message, exception)
when /violates foreign key constraint/
- InvalidForeignKey.new(message, exception)
+ ::ActiveRecord::InvalidForeignKey.new(message, exception)
else
super
end

0 comments on commit 9e246f7

Please sign in to comment.