method

enum

Importance_0
v7.1.3.4 - Show latest stable - 0 notes - Class: Enum
enum(name = nil, values = nil, **options) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/enum.rb, line 216
    def enum(name = nil, values = nil, **options)
      if name
        values, options = options, {} unless values
        return _enum(name, values, **options)
      end

      definitions = options.slice!(:_prefix, :_suffix, :_scopes, :_default, :_instance_methods)
      options.transform_keys! { |key| :"#{key[1..-1]}" }

      definitions.each { |name, values| _enum(name, values, **options) }
    end
Register or log in to add new notes.