module RailsSqlViews4 module Loader SUPPORTED_ADAPTERS = %w( Mysql Mysql2 PostgreSQL SQLServer SQLite SQLite3 OracleEnhanced ) def self.load_extensions SUPPORTED_ADAPTERS.each do |db| if ActiveRecord::ConnectionAdapters.const_defined?("#{db}Adapter") require "rails_sql_views4/connection_adapters/#{db.downcase}_adapter" ActiveRecord::ConnectionAdapters.const_get("#{db}Adapter").class_eval do include RailsSqlViews4::ConnectionAdapters::AbstractAdapter include RailsSqlViews4::ConnectionAdapters.const_get("#{db}Adapter") end end end end end end