-
Notifications
You must be signed in to change notification settings - Fork 565
Closed
Description
The following example code is proposed at the moment:
module ActiveRecord
module ConnectionAdapters
class SQLServerAdapter < AbstractAdapter
def configure_connection
super
@raw_connection.execute("SET TEXTSIZE #{64.megabytes}").do
end
end
end
endHowever, as of commit 4842d2e, this implementation no longer works, as far as I see it.
This is because method #configure_connection was defined on SQLServerAdapter in that commit, which means that the example in the Readme will override this method, causing a call to super to invoke AbstractAdapter#configure_connection and not SQLServerAdapter#configure_connection (as intended).
The following adaptation of the example code works for me:
ActiveRecord::ConnectionAdapters::SQLServerAdapter.prepend(
Module.new do
def configure_connection
super
@raw_connection.execute("SET TEXTSIZE #{64.megabytes}").do
end
end
)Metadata
Metadata
Assignees
Labels
No labels