Class: Sidebar::ParamField::SelectField

Inherits:
Sidebar::ParamField show all
Defined in:
lib/sidebar.rb

Instance Attribute Summary

Attributes inherited from Sidebar::ParamField

#default, #key, #options

Instance Method Summary collapse

Methods inherited from Sidebar::ParamField

build, #canonicalize, class_for, #initialize, #input_name, #label, #label_html, #line_html

Constructor Details

This class inherits a constructor from Sidebar::ParamField

Instance Method Details

#input_html(sidebar) ⇒ Object



52
53
54
55
56
# File 'lib/sidebar.rb', line 52

def input_html(sidebar)
  select_tag(input_name(sidebar),
             options_for_select(options[:choices], sidebar.config[key]),
             options)
end