We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0e7b4d1 commit b52404fCopy full SHA for b52404f
1 file changed
lib/umbrellio_utils/sql.rb
@@ -4,7 +4,13 @@ module UmbrellioUtils
4
module SQL
5
extend self
6
7
- UniqueConstraintViolation = Sequel::UniqueConstraintViolation if defined?(::Sequel)
+ if defined?(::Rails) && defined?(::Sequel)
8
+ Rails.configuration.after_initialize do
9
+ UniqueConstraintViolation = Sequel::UniqueConstraintViolation if defined?(::Sequel)
10
+ end
11
+ elsif defined?(::Sequel)
12
13
14
15
def [](*args)
16
Sequel[*args]
0 commit comments