Sha256: 5da278fff170b28d093f3e6398eb333bb148896f195b2659786e86c3e82ee974

Contents?: true

Size: 548 Bytes

Versions: 5

Compression:

Stored size: 548 Bytes

Contents

require 'active_record/connection_adapters/sqlite3_adapter'

module ActiveRecord
  module ConnectionAdapters
    class SQLite3Adapter < (defined?(SQLiteAdapter) ? SQLiteAdapter : AbstractAdapter)
      def type_to_sql_with_enum type, limit=nil, *args
        if type.to_s == "enum" || type.to_s == "set"
          type, limit = :string, nil
        end
        type_to_sql_without_enum type, limit, *args
      end
      alias_method :type_to_sql_without_enum, :type_to_sql
      alias_method :type_to_sql, :type_to_sql_with_enum
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
activerecord_enum-0.4.1 lib/connection_adapters/sqlite3.rb
native_enum-1.0.0 lib/connection_adapters/sqlite3.rb
native_enum-1.0.0pre1 lib/connection_adapters/sqlite3.rb
activerecord_enum-0.4.0 lib/connection_adapters/sqlite3.rb
activerecord_enum-0.3.0 lib/connection_adapters/sqlite3.rb