Class: Formular::Element::Select

Inherits:
Control
  • Object
show all
Includes:
Modules::Collection
Defined in:
lib/formular/elements.rb

Overview

class Input

Direct Known Subclasses

Bootstrap3::Select, Foundation6::Select

Instance Method Summary collapse

Methods included from Module

included

Instance Method Details

#option_tagsObject

convert the collection array into option tags also supports option groups when the array is nested example 1: [[1,"True"], [0,"False"]] =>

example 2: [ ["Genders", [["m", "Male"], ["f", "Female"]]], ["Booleans", [[1,"true"], [0,"false"]]] ] =>


201
202
203
# File 'lib/formular/elements.rb', line 201

def option_tags
  collection_to_options(options[:collection])
end