Class: Terrazzo::Field::Select

Inherits:
Base
  • Object
show all
Defined in:
lib/terrazzo/field/select.rb

Constant Summary

Constants inherited from Base

Base::ABSTRACT_FIELD_CLASSES

Instance Attribute Summary

Attributes inherited from Base

#attribute, #data, #options, #page, #resource

Instance Method Summary collapse

Methods inherited from Base

associative?, default_options, eager_load?, #field_type, field_type, #form_input_attributes, #initialize, permitted_attribute, #required?, searchable?, sortable?, transform_param, with_options

Constructor Details

This class inherits a constructor from Terrazzo::Field::Base

Instance Method Details

#serializable_options(page = nil) ⇒ Object



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

def serializable_options(page = nil)
  return {} unless page == :form
  { selectableOptions: resolve_collection }
end

#serialize_value(_mode) ⇒ Object



4
5
6
# File 'lib/terrazzo/field/select.rb', line 4

def serialize_value(_mode)
  data
end