File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 1212 rescue LoadError => e
1313 warn "activerecord-jdbc-adapter failed to load railtie: #{ e . inspect } "
1414 end if defined? ( Rails ) && ActiveRecord ::VERSION ::MAJOR >= 3
15+
16+ ActiveSupport . on_load ( :active_record ) do
17+ ActiveRecord ::ConnectionAdapters . register (
18+ "sqlite3" , "ActiveRecord::ConnectionAdapters::SQLite3Adapter" , "arjdbc/sqlite3/adapter"
19+ )
20+ ActiveRecord ::ConnectionAdapters . register (
21+ "postgresql" , "ActiveRecord::ConnectionAdapters::PostgreSQLAdapter" , "arjdbc/postgresql/adapter"
22+ )
23+ ActiveRecord ::ConnectionAdapters . register (
24+ "mysql2" , "ActiveRecord::ConnectionAdapters::Mysql2Adapter" , "arjdbc/mysql/adapter"
25+ )
26+ end
1527else
1628 warn "activerecord-jdbc-adapter is for use with JRuby only"
1729end
1830
19- require 'arjdbc/version'
31+ require 'arjdbc/version'
You can’t perform that action at this time.
0 commit comments