Skip to content

Commit

Permalink
Made it possible to do text_field :account, :name in addition to text…
Browse files Browse the repository at this point in the history
…_field "account", "name"

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1088 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Apr 4, 2005
1 parent d6901bf commit a87c1d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actionpack/lib/action_view/helpers/form_helper.rb
Expand Up @@ -149,7 +149,7 @@ class InstanceTag #:nodoc:
DEFAULT_DATE_OPTIONS = { :discard_type => true }.freeze unless const_defined?(:DEFAULT_DATE_OPTIONS) DEFAULT_DATE_OPTIONS = { :discard_type => true }.freeze unless const_defined?(:DEFAULT_DATE_OPTIONS)


def initialize(object_name, method_name, template_object, local_binding = nil) def initialize(object_name, method_name, template_object, local_binding = nil)
@object_name, @method_name = object_name, method_name @object_name, @method_name = object_name.to_s, method_name.to_s
@template_object, @local_binding = template_object, local_binding @template_object, @local_binding = template_object, local_binding
if @object_name.sub!(/\[\]$/,"") if @object_name.sub!(/\[\]$/,"")
@auto_index = @template_object.instance_variable_get("@#{Regexp.last_match.pre_match}").id_before_type_cast @auto_index = @template_object.instance_variable_get("@#{Regexp.last_match.pre_match}").id_before_type_cast
Expand Down

0 comments on commit a87c1d4

Please sign in to comment.