This project is archived and is in readonly mode.
Making ActiveRecord #merge_joins strip whitespace
Reported by FiXato | October 30th, 2008 @ 11:04 AM
In edge Rails the joins are nicely merged and duplicate join strings are uniq'ed out. However, if there is still some whitespace at the start and/or beginning, which is the case when hash-style joins are converted to string joins, they won't be an exact string match and will thus duplicates will not be removed and an ActiveRecord::InvalidStatement will most likely be raised.
Of course other things, such as database specific escaping, can still cause identical joins to not be an exact string match, however this patch will at least improve the chance of matches since it strips all joins of leading/trailing whitespaces.
Comments and changes to this ticket
-
FiXato October 31st, 2008 @ 08:59 AM
- Title changed from make ActiveRecord merge_joins strip whitespace to [PATCH] making ActiveRecord #merge_joins strip whitespace
- Tag changed from 2.2, :joins, active, activerecord, merge_joins, scope to 2.2, :joins, active, activerecord, merge_joins, patch, scope
-
Pratik January 19th, 2009 @ 08:09 PM
- Milestone cleared.
- Assigned user set to Pratik
- Title changed from [PATCH] making ActiveRecord #merge_joins strip whitespace to Making ActiveRecord #merge_joins strip whitespace
-
Repository January 28th, 2009 @ 08:01 PM
- State changed from new to resolved
(from [a0d8202bb9fa55c328a3170836b0cddb40631e83]) Ensure whitespaces are stripped when merging string joins. [#1297 state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com 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
Referenced by
- 1297 Making ActiveRecord #merge_joins strip whitespace (from [a0d8202bb9fa55c328a3170836b0cddb40631e83]) Ensure ...