Prototype helpers should generate Element.insert instead of Insertion.new
Reported by miloops | 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
-
miloops July 3rd, 2008 @ 10:22 PM
- → Assigned user changed from to DHH
-
miloops July 22nd, 2008 @ 03:14 PM
- no changes were found...
-
miloops 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
- → Milestone changed from 2.x to 2.1.1
- → State changed from new to open
-
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?
-
miloops 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.
-
miloops 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.
-
miloops 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:20 AM
- → Milestone changed from 2.1.1 to 2.1.3
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
Source available from github
The Git repository resides at http://github.com/rails
Check out the current development trunk (Edge Rails) with:
git clone git://github.com/rails/rails.git
Creating or reviewing a patch
See the contributor guide.
Creating a feature request
Please don't. If you want a new feature in Rails, you'll have to pull up your sleeves and get busy yourself. Or convince someone else to do it. See the contributor guide on how to get going. But posting them here is just going to lead to ticket root.
Creating a bug report
When creating a bug report, be sure to include as much relevant information as possible. Post the code sample that causes the problem. Preferably, alter the unit tests and show through either changed or added tests how the expected behavior is not occuring.
Security vulnerabilities should be reported via an email to security@rubyonrails.org, do not use trac for reporting security vulnerabilities. All content in trac is publicly available as soon as it is posted.
Then don't get your hopes up. Unless you have a "Code Red, Mission Critical, The World is Coming to an End" kinda bug, you're creating this ticket in the hope that others with the same problem will be able to collaborate with you on solving it. Do not expect that the ticket automatically will see any activity or that others will jump to fix it. Creating a ticket like this is mostly to help yourself start on the path of fixing the problem and for others to sign on to with a "I'm having this problem too".
