-
Notifications
You must be signed in to change notification settings - Fork 565
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow AbstractAdapter to detect sqlserver connection
Allow AbstractAdapter to detect sqlserver connection
- Loading branch information
Showing
3 changed files
with
26 additions
and
7 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
lib/active_record/connection_adapters/sqlserver/core_ext/abstract_adapter.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# frozen_string_literal: true | ||
|
||
module ActiveRecord | ||
module ConnectionAdapters | ||
module SQLServer | ||
module CoreExt | ||
module AbstractAdapter | ||
def sqlserver? | ||
false | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
|
||
ActiveSupport.on_load(:active_record) do | ||
mod = ActiveRecord::ConnectionAdapters::SQLServer::CoreExt::AbstractAdapter | ||
ActiveRecord::ConnectionAdapters::AbstractAdapter.prepend(mod) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters