Class: Madmin::Field::Select

Inherits:
Madmin::Field show all
Defined in:
lib/madmin/field/select.rb

Overview

This field represents a select dropdown value.

Instance Attribute Summary collapse

Attributes inherited from Madmin::Field

#form, #index, #key, #label, #model, #options, #show, #type

Instance Method Summary collapse

Methods inherited from Madmin::Field

#strong_params_keys, #to_partial_path, #value_for

Constructor Details

#initialize(args) ⇒ Select



8
9
10
# File 'lib/madmin/field/select.rb', line 8

def initialize(args)
  @select_options = option_or_default(:collection, [])
end

Instance Attribute Details

#select_optionsObject (readonly)

Returns the value of attribute select_options.



6
7
8
# File 'lib/madmin/field/select.rb', line 6

def select_options
  @select_options
end