开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜