Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #7705: ticket7705.patch

File ticket7705.patch, 0.6 kB (added by crayz, 1 year ago)
  • actionpack/lib/action_view/helpers/form_tag_helper.rb

    old new  
    6565      #  
    6666      # A hash of standard HTML options for the tag. 
    6767      def text_field_tag(name, value = nil, options = {}) 
     68        id = (/\w+\[\w+\]/ === name) ? /(\w+)\[(\w+)\]/.match(name)[1..2].join("_") : name 
    6869        tag :input, { "type" => "text", "name" => name, "id" => name, "value" => value }.update(options.stringify_keys) 
    6970      end 
    7071