Class: Gluttonberg::FormBuilder
Instance Method Summary
collapse
#asset_browser, #asset_tag, #clear_asset, #datetime_field, #publisable_dropdown
Instance Method Details
15
16
17
18
19
|
# File 'lib/gluttonberg/helpers/form_builder.rb', line 15
def radio_button(attribute, value, label, options = {})
add_class!('radio', options)
label_for = "#{object_name}_#{attribute}_#{value}"
super(attribute, value, options) + label(attribute, :label => label, :class => 'inline', :for => label_for)
end
|
#select(attribute, choices, options = {}) ⇒ Object
21
22
23
24
|
# File 'lib/gluttonberg/helpers/form_builder.rb', line 21
def select(attribute, choices, options={})
box_class = add_class!('text', options)
field(super, attribute, options, box_class)
end
|
#text_area(attribute, options = {}) ⇒ Object
10
11
12
13
|
# File 'lib/gluttonberg/helpers/form_builder.rb', line 10
def text_area(attribute, options={})
box_class = add_class!('text', options)
field(super, attribute, options, box_class)
end
|
#text_field(attribute, options = {}) ⇒ Object
5
6
7
8
|
# File 'lib/gluttonberg/helpers/form_builder.rb', line 5
def text_field(attribute, options={})
box_class = add_class!('text', options)
field(super, attribute, options, box_class)
end
|