Sha256: 98d809f81aa5650d593b87843f148de89100e429831eb9caa332144efbad3ffa
Contents?: true
Size: 511 Bytes
Versions: 1
Compression:
Stored size: 511 Bytes
Contents
module Pgcli module Rails module MonkeyPatch 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 def find_cmd_and_exec(commands, *args) commands = "pgcli" if commands == "psql" super end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pgcli-rails-0.9.1 | lib/pgcli/rails/monkey_patch.rb |