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.

[PATCH] 2.3.2 text_area_tag calling stringify_keys two times

#2587

Hello,

The text_area_tag is calling stringify_keys 2 times unnecessary. See:


      def text_area_tag(name, content = nil, options = {})
        options.stringify_keys!

        if size = options.delete("size")
          options["cols"], options["rows"] = size.split("x") if size.respond_to?(:split)
        end

        content_tag :textarea, content, { "name" => name, "id" => name }.update(options.stringify_keys)
      end

The first time, the method is called to self instance and second time is called again (unnecessary).

Thank you

Reported by Gabriel Sobrinho · April 30th, 2009 @ 07:59 PM

State: resolved
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. CancelProfileIsBroken
    CancelProfileIsBroken
    • Tag changed from 2.3.2, action_view to 2.3.2, action_view, bugmash

    August 6th, 2009 @ 02:20 PM

  2. Rizwan Reza
    Rizwan Reza

    +1 verified. I removed the second method call to stringify_keys in the second last line and verified that all the tests still pass.

    August 7th, 2009 @ 08:13 PM

  3. Steve St. Martin
    Steve St. Martin

    +1 verified. I removed second call to stringify_keys on line 265, I've attached a patch all tests still pass

    August 8th, 2009 @ 01:08 AM

  4. Steve St. Martin
    Steve St. Martin
    • Title changed from 2.3.2 text_area_tag calling stringify_keys two times to [PATCH] 2.3.2 text_area_tag calling stringify_keys two times

    August 8th, 2009 @ 02:52 AM

  5. Elad Meidar
    Elad Meidar

    +1 verified, patch added to test app and a mini app, both pass completely as well as Rails tests.

    August 8th, 2009 @ 03:42 AM

  6. Repository
  7. CancelProfileIsBroken
    CancelProfileIsBroken
    • State changed from new to resolved

    August 8th, 2009 @ 08:38 PM

  8. Greg Sterndale
    Greg Sterndale

    +1 verified. patch applied, tests pass

    August 8th, 2009 @ 10:45 PM

  9. Edd Morgan
    Edd Morgan

    Applied and tests pass OK on 2-3-stable. +1 here

    August 8th, 2009 @ 11:02 PM

  10. CancelProfileIsBroken
    CancelProfileIsBroken
    • Tag changed from 2.3.2, action_view, bugmash to 2.3.2, action_view
    • Milestone cleared.

    August 8th, 2009 @ 11:07 PM