Class: ActionView::Helpers::FormBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/need_label/helpers.rb

Instance Method Summary collapse

Instance Method Details

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



43
44
45
46
47
48
# File 'lib/need_label/helpers.rb', line 43

def label(method, text = nil, options = {}, &block)
  if @object_name.class == Symbol
    @object = @template.instance_variable_get("@#{@object_name}")
  end
  @template.need_label(@object_name, @object, method, text, objectify_options(options), &block)
end