6
7
8
9
10
11
12
13
14
15
16
17
18
|
# File 'lib/rails_sql_views/loader.rb', line 6
def self.load_extensions
SUPPORTED_ADAPTERS.each do |db|
if ActiveRecord::ConnectionAdapters.const_defined?("#{db}Adapter")
require "rails_sql_views/connection_adapters/#{db.downcase}_adapter"
ActiveRecord::ConnectionAdapters.const_get("#{db}Adapter").class_eval do
include RailsSqlViews::ConnectionAdapters::AbstractAdapter
include RailsSqlViews::ConnectionAdapters.const_get("#{db}Adapter")
$rails_sql_views_included = true
end
end
end
end
|