Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

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

#3149

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.

Reported by jeffp · September 4th, 2009 @ 09:20 PM

State: open
Milestone: 3.0.6
Assigned to: nobody
Importance: Low

Activity

  1. jeffp
    jeffp
    • Tag changed from 2.3.3, 2.3.4 to 2.3.3, 2.3.4, actionpack, helpers

    September 4th, 2009 @ 09:23 PM

  2. CancelProfileIsBroken
    CancelProfileIsBroken
    • Tag changed from 2.3.3, 2.3.4, actionpack, helpers to 2.3.3, 2.3.4, actionpack, bugmash, helpers

    September 25th, 2009 @ 12:33 PM

  3. Daniel Hofstetter
    Daniel Hofstetter

    I've attached a patch for this issue. active_record_helper.rb.diff is for 2-3-stable, and active_model_helper.rb.diff is for master.

    September 27th, 2009 @ 09:57 AM

  4. Daniel Hofstetter
    Daniel Hofstetter
    • Tag changed from 2.3.3, 2.3.4, actionpack, bugmash, helpers to 2.3.3, 2.3.4, actionpack, bugmash, bugmash-patch, bugmash-review, helpers

    September 27th, 2009 @ 09:59 AM

  5. hsume2 (Henry)
    hsume2 (Henry)

    +1, verified in master and 2-3-stable. (master patch applies cleanly to both)

    September 27th, 2009 @ 10:28 AM

  6. CancelProfileIsBroken
    CancelProfileIsBroken
    • Tag changed from 2.3.3, 2.3.4, actionpack, bugmash, bugmash-patch, bugmash-review, helpers to 2.3.3, 2.3.4, actionpack, bugmash-review, helpers

    September 27th, 2009 @ 12:00 PM

  7. Rizwan Reza
    Rizwan Reza
    • Milestone cleared.
    • Tag changed from 2.3.3, 2.3.4, actionpack, bugmash-review, helpers to 2.3.3, 2.3.4, actionpack, bugmash, helpers
    • State changed from new to open

    May 15th, 2010 @ 06:45 PM

  8. Rizwan Reza
  9. Jeremy Kemper
    Jeremy Kemper
    • Milestone cleared.
    • Importance changed from to Low

    August 30th, 2010 @ 04:10 AM

  10. Jeremy Kemper
  11. Santiago Pastorino
  12. Dan Pickett
    Dan Pickett

    it looks like the patches were lost for some reason (I can't access them)

    February 8th, 2011 @ 02:56 AM

  13. Santiago Pastorino
  14. Santiago Pastorino
    Santiago Pastorino
    • Milestone changed from 3.0.5 to 3.0.6

    February 27th, 2011 @ 03:15 AM