Files

SimpleForm::Components::Wrapper

Public Instance Methods

wrap(content) click to toggle source
# File lib/simple_form/components/wrapper.rb, line 4
def wrap(content)
  if wrapper_tag && options[:wrapper] != false
    template.content_tag(wrapper_tag, content, wrapper_html_options)
  else
    content
  end
end
wrapper_class() click to toggle source
# File lib/simple_form/components/wrapper.rb, line 16
def wrapper_class
  options[:wrapper_class] || SimpleForm.wrapper_class
end
wrapper_error_class() click to toggle source
# File lib/simple_form/components/wrapper.rb, line 20
def wrapper_error_class
  options[:wrapper_error_class] || SimpleForm.wrapper_error_class
end
wrapper_html_options() click to toggle source
# File lib/simple_form/components/wrapper.rb, line 24
def wrapper_html_options
  css_classes = input_html_classes.unshift(wrapper_class)
  css_classes << wrapper_error_class if has_errors?
  html_options_for(:wrapper, css_classes)
end
wrapper_tag() click to toggle source
# File lib/simple_form/components/wrapper.rb, line 12
def wrapper_tag
  options[:wrapper_tag] || SimpleForm.wrapper_tag
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.