This project is archived and is in readonly mode.
conditions_tables matches date ranges
Reported by Jan De Poorter | November 17th, 2008 @ 06:01 PM | in 2.x
ActiveRecord::Associations::ClassMethods#conditions_tables matches ranges in conditions. When you have a range in your conditions, say for example of 1.month.ago..Time.now, it returns [.].
Example:
>> User.first.logins.conditions_tables(:conditions => {:created_at => 1.month.ago...Time.now})
=> ["logins", "UTC.."]
This regexp is to blame:
conditions.join(' ').scan(/([\.a-zA-Z_]+).?\./).flatten
I'm working on a patch.
Comments and changes to this ticket
-
Jan De Poorter November 18th, 2008 @ 10:58 AM
A failing test. I can't seem to figure out what the correct regexp should be.
-
Frederick Cheung December 13th, 2008 @ 04:12 PM
- State changed from new to duplicate
Duplicate of #1404
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>