This project is archived and is in readonly mode.
ActiveRecord::Relation#merge merges other table's conditions having same attribute name
-
Akira Matsuda
- Tag changed from activerecord rails3, merge relation, edge, merge, patch, relation, scope, tested to activerecord rails3, merge relation, bug, edge, merge, patch, relation, scope, tested
Updated the patch so that it applies to the current Edge...
-
José Valim
- Milestone cleared.
- Assigned user set to Aaron Patterson
- Importance changed from to Low
-
Aaron Patterson
- State changed from new to incomplete
Hi Akira!
I tried this patch, but it makes the AR tests fail. Specifically a named scope test:
$ ruby -w -I"lib:test:test/connections/native_sqlite3" test/cases/named_scope_test.rb -n test_chaining_should_use_latest_conditions_when_searching /Users/apatterson/git/arel/lib/arel/algebra/attributes/attribute.rb:70: warning: method redefined; discarding old root Using native SQLite3 Loaded suite test/cases/named_scope_test Started F Finished in 0.063631 seconds. 1) Failure: test_chaining_should_use_latest_conditions_when_searching(NamedScopeTest) [test/cases/named_scope_test.rb:352:in `test_chaining_should_use_latest_conditions_when_searching' /Users/apatterson/git/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__' /Users/apatterson/git/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run' /Users/apatterson/git/rails/activesupport/lib/active_support/callbacks.rb:418:in `_run_setup_callbacks' /Users/apatterson/git/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:65:in `run']: <[#<Post id: 4, author_id: 1, title: "sti comments", body: "hello", type: "Post", comments_count: 0, taggings_count: 0>]> expected but was <[]>. 1 tests, 3 assertions, 1 failures, 0 errorsCan you check the patch and make sure the AR tests pass?
-
Aditya Sanghi
Automatic cleanup of spam.
-
Aditya Sanghi
Automatic cleanup of spam.
-
Ryan Bigg
Automatic cleanup of spam.
-
Ryan Bigg
Automatic cleanup of spam.
-
Repository
- State changed from incomplete to resolved
(from [296467fcc40bb3c6a4f42dedc267eb4f313843a9]) only returning where values for the corresponding relation, also filtering where value hash based on table name [#5234 ActiveRecord::Relation#scope_for_create wrongly merges other table's conditio... state:resolved] [#5184 ActiveRecord::Relation#merge merges other table's conditions having same attr... state:resolved] http://github.com/rails/rails/commit/296467fcc40bb3c6a4f42dedc267eb...
-
Repository
(from [29b3af539b1a61141a42adb04b78d86433bdd21e]) only returning where values for the corresponding relation, also filtering where value hash based on table name [#5234 ActiveRecord::Relation#scope_for_create wrongly merges other table's conditio... state:resolved] [#5184 ActiveRecord::Relation#merge merges other table's conditions having same attr... state:resolved] http://github.com/rails/rails/commit/29b3af539b1a61141a42adb04b78d8...
