Why is this not rejecting my records
>> a
=> [6, 8, 10, 12, 14]
>&开发者_JS百科gt; @project.posts(:all, :conditions => [ "id not in (?)", a ])
=> [#<Post id: 6,........
Why is this not filtering the POst with id of 6
I think you need to use @project.posts.find(:all, :conditions => .....)
. The method call of just the association itself takes one parameter which indicates whether to reload the association or not.
精彩评论