This project is archived and is in readonly mode.
activerecord condition hashes should respect ruby range syntax
-
Alex Arnell
updated ticket with proper git formatted patch
-
Pratik
- Assigned user set to Pratik
- State changed from new to incomplete
- Milestone cleared.
I feel the check should be made in attribute_condition() method. I understand it might require a bit more refactoring, but that's worth it.
Thanks.
-
CancelProfileIsBroken
- Tag set to activerecord, bugmash, edge, enhancement, patch
-
dira
not reproducible.
The functionality has already been implemented:
# activerecord/test/cases/finder_test def test_find_on_hash_conditions_with_end_exclusive_range assert_equal [1,2,3], Topic.find(:all, :conditions => { :id => 1..3 }).map(&:id).sort assert_equal [1,2], Topic.find(:all, :conditions => { :id => 1...3 }).map(&:id).sort assert_raise(ActiveRecord::RecordNotFound) { Topic.find(3, :conditions => { :id => 2...3 }) } end(and the patch does not apply)
-
Pratik
- State changed from incomplete to duplicate
What dira said - this was fixed in http://github.com/rails/rails/commit/9991868d85b25da672bf119bfcbff2...
-
CancelProfileIsBroken
- Assigned user cleared.
- Tag changed from activerecord, bugmash, edge, enhancement, patch to activerecord, edge, enhancement, patch
