static public Method

InstanceTag.new(object_name, method_name, template_object, local_binding = nil, object = nil)

There's no documentation for this item.

Source Code

# File action_view/helpers/form_helper.rb, line 455
def initialize(object_name, method_name, template_object, local_binding = nil, object = nil)
  @object_name, @method_name = object_name.to_s.dup, method_name.to_s.dup
  @template_object, @local_binding = template_object, local_binding
  @object = object
  if @object_name.sub!(/\[\]$/,"")
    if object ||= @template_object.instance_variable_get("@#{Regexp.last_match.pre_match}") and object.respond_to?(:to_param)
      @auto_index = object.to_param
    else
      raise ArgumentError, "object[] naming but object param and @object var don't exist or don't respond to to_param: #{object.inspect}"
    end
  end
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.