Reputation: 4038
I have a problem with my rails app. I get the following Error:
NameError (uninitialized constant ActiveRecord::RecordNotUnique)
Im not sure why this is as it works on my development environment. The exception gets tested by:
begin ... rescue ActiveRecord::RecordNotUnique next end
Lg Markus
Upvotes: 3
Views: 1828
Reputation: 430
When are you seeing this problem i.e. test, production?
What version of ActiveRecord do you have on this environment?
As far as I am aware ActiveRecord::RecordNotUnique became available in version 3.0.0 onwards apidock.com/rails/ActiveRecord/RecordNotUnique You need to have this version or greater to use this database exception.
Upvotes: 2