Sha256: 9865e5ea86842d5f16f9d721362e209f1e90f0dbb80fd1454ebff4b2acc972e5
Contents?: true
Size: 443 Bytes
Versions: 11
Compression:
Stored size: 443 Bytes
Contents
module ActiveRecord module PGEnum register :column_options do require "active_record/connection_adapters/postgresql_adapter" ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.prepend PrepareColumnOptions end module PrepareColumnOptions def prepare_column_options(column, types) spec = super spec[:as] = column.sql_type.inspect if column.type == :enum spec end end end end
Version data entries
11 entries across 11 versions & 1 rubygems