Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

ActiveRecord association array doesn't behave like a normal array

#6257

https://gist.github.com/767908

Couldn't format properly in here... check out gist.

Reported by David Santoro · January 6th, 2011 @ 02:05 PM

State: resolved
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. David Santoro
    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.

    January 7th, 2011 @ 12:56 AM

  2. David Santoro
    David Santoro

    Sorry, I forgot about the markdown formatting, I hope it's enough readable.

    January 7th, 2011 @ 12:58 AM

  3. Repository
  4. Repository