method

gem_for_database

rails latest stable - Class: Rails::Generators::AppBase

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v5.2.3) is shown here.

gem_for_database()
private

No documentation available.

# File railties/lib/rails/generators/app_base.rb, line 300
      def gem_for_database
        # %w( mysql postgresql sqlite3 oracle frontbase ibm_db sqlserver jdbcmysql jdbcsqlite3 jdbcpostgresql )
        case options[:database]
        when "mysql"          then ["mysql2", [">= 0.4.4", "< 0.6.0"]]
        when "postgresql"     then ["pg", [">= 0.18", "< 2.0"]]
        when "oracle"         then ["activerecord-oracle_enhanced-adapter", nil]
        when "frontbase"      then ["ruby-frontbase", nil]
        when "sqlserver"      then ["activerecord-sqlserver-adapter", nil]
        when "jdbcmysql"      then ["activerecord-jdbcmysql-adapter", nil]
        when "jdbcsqlite3"    then ["activerecord-jdbcsqlite3-adapter", nil]
        when "jdbcpostgresql" then ["activerecord-jdbcpostgresql-adapter", nil]
        when "jdbc"           then ["activerecord-jdbc-adapter", nil]
        else [options[:database], nil]
        end
      end