Made it possible to do text_field :account, :name in addition to text_field "account", "name"

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1088 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 d6901bfe
......@@ -149,7 +149,7 @@ class InstanceTag #:nodoc:
DEFAULT_DATE_OPTIONS = { :discard_type => true }.freeze unless const_defined?(:DEFAULT_DATE_OPTIONS)
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
if @object_name.sub!(/\[\]$/,"")
@auto_index = @template_object.instance_variable_get("@#{Regexp.last_match.pre_match}").id_before_type_cast
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册