Module: Pgcli::Rails::MonkeyPatch
- Defined in:
- lib/pgcli/rails/monkey_patch.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.apply! ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/pgcli/rails/monkey_patch.rb', line 4 def self.apply! if ::Rails.gem_version >= Gem::Version.new("7.1.0") require "active_record/connection_adapters/postgresql_adapter" ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.singleton_class.prepend self else ::Rails::DBConsole.prepend self end end |
Instance Method Details
#find_cmd_and_exec(commands, *args) ⇒ Object
13 14 15 16 |
# File 'lib/pgcli/rails/monkey_patch.rb', line 13 def find_cmd_and_exec(commands, *args) commands = "pgcli" if commands == "psql" super end |