This project is archived and is in readonly mode.

#3149 open
jeffp

Active Record Helper form(record_name, options={}) fails (but simple fix)

Reported by jeffp | September 4th, 2009 @ 09:20 PM | in 3.0.6

Location: actionpack-2.3.4/lib/action_view/helpers/active_record_helpers.rb

Line with error
contents = form_tag({:action => action}, :method =>(options[:method] || 'post'), :encrypt => ...

Fix
contents = form_tag(action, :method=>(options[:method] || 'post'), :encrypt => ...

Description
The 'action' variable has already been cast as a URL with url_for a few lines before this. It is not proper to use it as a value for :action in a hash when sending it to form_tag.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages