Class: Admin::Sections::SelectType

Inherits:
Minimal::Template
  • Object
show all
Defined in:
app/views/admin/sections/_select_type.html.rb

Instance Method Summary collapse

Instance Method Details

#to_htmlObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'app/views/admin/sections/_select_type.html.rb', line 2

def to_html
  simple_form_for(resources, :as => :section, :url => { :action => :new }, :html => { :method => :get, :class => 'section_type' }) do |f|
    fieldset do
      f.label :type
      div :class => :radio_group do
        section_types_option_values.each do |name, value|
          f.radio_button :type, value, :class => :section_type
          f.label "type_#{value.underscore}", name, :class => :inline
        end
        f.submit 'Select', :class => :inline
      end
    end
  end
end