This project is archived and is in readonly mode.
Prototype helpers should generate Element.insert instead of Insertion.new
Reported by Emilio Tagua | July 2nd, 2008 @ 10:25 PM | in 2.1.3
I have updated the code of a patch i did time ago:
http://dev.rubyonrails.org/ticke...
Rails prototype helpers should generate Element.insert instead of Insertion.new because this has been deprecated in Prototype 1.6 as explained in the old ticket.
More information about this can be found in:
Comments and changes to this ticket
-
Emilio Tagua July 3rd, 2008 @ 10:22 PM
- Assigned user set to DHH
-
Emilio Tagua July 22nd, 2008 @ 03:14 PM
- no changes were found...
-
Emilio Tagua July 22nd, 2008 @ 03:24 PM
Third time updating the patch so it can be merged...
Any comments?
-
Pratik July 29th, 2008 @ 09:07 PM
- Assigned user changed from DHH to Pratik
-
Jeremy Kemper July 29th, 2008 @ 09:54 PM
- State changed from new to open
- Milestone changed from 2.x to 2.1.1
-
Mislav August 5th, 2008 @ 06:43 PM
+1
There is a typo in RDoc: missing opening double quote here:
new Element.insert("list", { bottom: <li>Some item</li>" });
The patch seems a bit large and certain parts very hackish. Still, I haven't had time to actually study RJS code in depth. Are you sure this is in its simplest form?
-
Emilio Tagua August 6th, 2008 @ 02:26 PM
Mislav, thanks for your feedback.
I have fixed the typo in docrails:
http://github.com/lifo/docrails/...
About the patch being large, i don't quite agree, i did have to change tests to match the new output and update docs.
I do agree selector_assertions is a very hackish helper, as it was before the patch. I'll try to work on it and create a new ticket with the results.
Thanks again for you comments.
-
Emilio Tagua August 7th, 2008 @ 05:33 PM
I've improved selector_assertion by: - Making use of constants that were defined but never used. - Improving the readability of the code. - Adding test to untested code. - Simplifying Regexps.
This second patch applies on the current version, that would be after the first patch of this ticket was commited.
Anyway, the former patch works well and the later one is just and improvement to code that was already in.
-
Mislav August 7th, 2008 @ 05:58 PM
The code is a bit shorter, nicer, and adds a missing test.
+1 from me
-
Repository August 30th, 2008 @ 02:06 AM
- State changed from open to resolved
(from [11eb29f60ab79caf22f7ca715500e32d9a1b03a2]) Make assert_select_rjs code more readable, make use of unused constants and use more simple Regexps.
[#540 state:resolved]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net http://github.com/rails/rails/co...
-
Jeremy Kemper September 6th, 2008 @ 11:46 PM
- State changed from resolved to open
This caused a regression that wasn't covered by a test case.
-
Emilio Tagua September 8th, 2008 @ 04:44 PM
I have ran the test against the branches 2-1-stable and 2-0-stable (before any of these patches were commited), and the test fails on both, i can't see either were the previous code verified the double insertion to raise any error.
By the way, should an error be raised in that situation?
-
Pratik October 4th, 2008 @ 03:09 PM
- Assigned user changed from Pratik to Jeremy Kemper
-
Jeremy Kemper October 24th, 2008 @ 03:19 AM
- Milestone changed from 2.1.1 to 2.1.3
-
Repository December 26th, 2008 @ 09:57 PM
- State changed from open to resolved
(from [dce0da77e7ef602f7420f43c0d1aba5a99a00bdb]) Fix assert_select_rjs not checking id for inserts [#540 state:resolved] http://github.com/rails/rails/co...
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
Tags
Referenced by
- 493 update_counters should update nil values Whoa. Wrong ticket -- wanted to comment on #540
- 540 Prototype helpers should generate Element.insert instead of Insertion.new [#540 state:resolved]
- 982 assert_select_rjs failing to fail in rails v2.1.1 reopened #540
- 540 Prototype helpers should generate Element.insert instead of Insertion.new (from [dce0da77e7ef602f7420f43c0d1aba5a99a00bdb]) Fix ass...