Files

SimpleForm::Components::Labels

Public Class Methods

included(base) click to toggle source
# File lib/simple_form/components/labels.rb, line 4
def self.included(base)
  base.extend ClassMethods
end

Public Instance Methods

label() click to toggle source
# File lib/simple_form/components/labels.rb, line 26
def label
  @builder.label(label_target, label_text, label_html_options)
end
label_html_options() click to toggle source
# File lib/simple_form/components/labels.rb, line 38
def label_html_options
  label_options = html_options_for(:label, [input_type, required_class])
  label_options[:for] = options[:input_html][:id] if options.key?(:input_html)
  label_options
end
label_target() click to toggle source
# File lib/simple_form/components/labels.rb, line 34
def label_target
  attribute_name
end
label_text() click to toggle source
# File lib/simple_form/components/labels.rb, line 30
def label_text
  SimpleForm.label_text.call(raw_label_text, required_label_text).html_safe
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.