This project is archived and is in readonly mode.
[PATCH] search_field form helper leaves the :object key in html attributes
Reported by Aditya Sanghi | September 29th, 2010 @ 12:51 PM
It seems the search_field form helper does not remove the "object" key from the options.
The search_field function stringify's keys and later tries to delete it as a symbol which obviously doesnt work.
This leaves the output form field with an invalid attribute "object='#<Post:0x103711958>'".
The fix is fairly simple and a patch is attached, or should i send a pull request?
My change is committed here -
http://github.com/asanghi/rails/commit/7ce0614ee4250606f03185a39585...
Feel free to point me out to the proper process of doing this.
Comments and changes to this ticket
-
Aditya Sanghi September 29th, 2010 @ 12:54 PM
- Tag changed from formhelper, rails3.0.0 to 3.0.0, formhelper, rails3.0.0
-
Aditya Sanghi September 29th, 2010 @ 12:55 PM
- Tag changed from 3.0.0, formhelper, rails3.0.0 to 3.0.0, formhelper
-
Aditya Sanghi September 29th, 2010 @ 01:52 PM
- Assigned user set to José Valim
- Tag changed from 3.0.0, formhelper to 3.0.0, actionview, formhelper
This time i read the contributor's guide and now i'm providing the patch as well.
-
Aditya Sanghi September 29th, 2010 @ 01:53 PM
- Title changed from search_field form helper leaves leaves the :object key in options invalidating the form to [PATCH] search_field form helper leaves leaves the :object key in options invalidating the form
-
Aditya Sanghi September 29th, 2010 @ 07:25 PM
- Tag changed from 3.0.0, actionview, formhelper to 3.x, actionview, formhelper
-
Aditya Sanghi October 1st, 2010 @ 07:07 AM
- Title changed from [PATCH] search_field form helper leaves leaves the :object key in options invalidating the form to [PATCH] search_field form helper leaves the :object key in html attributes
-
Rohit Arondekar October 2nd, 2010 @ 11:07 AM
- State changed from new to incomplete
- Importance changed from to Low
You need to add a test so that the code is not removed later on.
-
Aditya Sanghi October 2nd, 2010 @ 01:21 PM
Alrighty then .. here's another patch with a test included as well. Was real tricky to get the test in place since the problem only surface when used in the form_for context. Not sure if the test is in the right location right now but that's the best i could think of.
-
Aditya Sanghi October 2nd, 2010 @ 01:24 PM
- Tag changed from 3.x, actionview, formhelper to 3.x, actionview, formhelper, state:new
-
Aditya Sanghi October 2nd, 2010 @ 01:25 PM
- Tag changed from 3.x, actionview, formhelper, state:new to 3.x, actionview, formhelper
-
Repository October 2nd, 2010 @ 04:52 PM
- State changed from incomplete to resolved
(from [8d1df887d32643f0aee2d71f7216ec98fdfe4fdb]) Fixing search_field to remove object attribute from options hash [#5730 state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/8d1df887d32643f0aee2d71f7216ec... -
Repository October 2nd, 2010 @ 04:55 PM
(from [3569bde28e47d351065208266a5c4a3fc7f3f8ae]) Fixing search_field to remove object attribute from options hash [#5730 state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/3569bde28e47d351065208266a5c4a...
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>
People watching this ticket
Attachments
Referenced by
- 5730 [PATCH] search_field form helper leaves the :object key in html attributes (from [8d1df887d32643f0aee2d71f7216ec98fdfe4fdb]) Fixing ...
- 5730 [PATCH] search_field form helper leaves the :object key in html attributes (from [3569bde28e47d351065208266a5c4a3fc7f3f8ae]) Fixing ...