Sha256: 30ce2e021c89896102a41aae8ef6ecd09d3102690eca1a66486ed025bb75bb00

Contents?: true

Size: 404 Bytes

Versions: 3

Compression:

Stored size: 404 Bytes

Contents

require "active_record/pg_enum/4.2/table_definition"

module ActiveRecord
  module PGEnum
    module TableDefinition
      # Create an enum column inside a TableDefinition
      #
      # Example:
      #
      #   create_table :orders do |t|
      #     t.enum :status, as: "status_type"
      #   end
      def enum(name, as:, **options)
        column(name, as, **options)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
activerecord-pg_enum-2.0.0 lib/active_record/pg_enum/6.0/table_definition.rb
activerecord-pg_enum-1.2.2 lib/active_record/pg_enum/6.0/table_definition.rb
activerecord-pg_enum-1.2.1 lib/active_record/pg_enum/6.0/table_definition.rb