class ActionView::Helpers::Tags::CollectionHelpers::Builder
:nodoc:
:nodoc:
:nodoc:
def initialize(template_object, object_name, method_name, object,
def initialize(template_object, object_name, method_name, object, sanitized_attribute_name, text, value, input_html_options) @template_object = template_object @object_name = object_name @method_name = method_name @object = object @sanitized_attribute_name = sanitized_attribute_name @text = text @value = value @input_html_options = input_html_options end
def label(label_html_options = {}, &block)
def label(label_html_options = {}, &block) html_options = @input_html_options.slice(:index, :namespace).merge(label_html_options) html_options[:for] ||= @input_html_options[:id] if @input_html_options[:id] @template_object.label(@object_name, @sanitized_attribute_name, @text, html_options, &block) end