Class: SidebarField::SelectField

Inherits:
SidebarField show all
Defined in:
lib/sidebar_field.rb

Instance Attribute Summary

Attributes inherited from SidebarField

#default, #key, #options

Instance Method Summary collapse

Methods inherited from SidebarField

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

Constructor Details

This class inherits a constructor from SidebarField

Instance Method Details

#input_html(sidebar) ⇒ Object



45
46
47
48
49
# File 'lib/sidebar_field.rb', line 45

def input_html(sidebar)
  select_tag(input_name(sidebar),
             options_for_select(options[:choices], current_value(sidebar)),
             options)
end