This project is archived and is in readonly mode.
ActiveRecord association array doesn't behave like a normal array
-
David Santoro
- Tag changed from activerecord relation to activerecord has_many association
I have created a failing test in rails/activerecord/test/cases/associations/has_many_through_associations_test.rb
def test_include_method_in_association_through_should_return_true_for_instance_added_by_pushing
person = Person.new post = Post.new person.posts.push(post) assert person.posts.include?(post)end
I'll try to fix it. Please confirm that it is a bug.
-
David Santoro
Sorry, I forgot about the markdown formatting, I hope it's enough readable.
-
Repository
- State changed from new to resolved
(from [10fa49bc1a25bd2cd25f211e2d8b1771beb58e21]) include_in_memory? should check against @target list in case of new records. [#6257 ActiveRecord association array doesn't behave like a normal array state:resolved] https://github.com/rails/rails/commit/10fa49bc1a25bd2cd25f211e2d8b1...
-
Repository
(from [3165dca28c1db741994c3176e7b158a9f684e816]) include_in_memory? should check against @target list in case of new records. [#6257 ActiveRecord association array doesn't behave like a normal array state:resolved] https://github.com/rails/rails/commit/3165dca28c1db741994c3176e7b15...