Class: Blogit::Admin::FormsHelper::FormBuilder

Inherits:
ActionView::Helpers::FormBuilder
  • Object
show all
Defined in:
app/helpers/blogit/admin/forms_helper.rb

Instance Method Summary collapse

Instance Method Details

#field(options = {}, &block) ⇒ Object



6
7
8
9
# File 'app/helpers/blogit/admin/forms_helper.rb', line 6

def field(options = {}, &block)
  options[:class] = Array(options[:class]) + [ "blogit_admin_form-field_wrapper" ]
  @template.(:div, options, &block)
end

#label(method, text = nil, options = {}, &block) ⇒ Object



11
12
13
14
# File 'app/helpers/blogit/admin/forms_helper.rb', line 11

def label(method, text = nil, options = {}, &block)
  options[:class] = Array(options[:class]) + [ 'blogit_admin_form-label']
  super
end

#text_area(method, options = {}) ⇒ Object



21
22
23
24
25
# File 'app/helpers/blogit/admin/forms_helper.rb', line 21

def text_area(method, options = {})
  options[:class] = Array(options[:class]) + 
    [ 'blogit_admin_form-editable_text_area' ]
  super
end

#text_field(method, options = {}) ⇒ Object



16
17
18
19
# File 'app/helpers/blogit/admin/forms_helper.rb', line 16

def text_field(method, options = {})
  options[:class] = Array(options[:class]) + [ 'blogit_admin_form-field' ]
  super
end