【发布时间】:2011-06-14 13:19:33
【问题描述】:
我有 2 个模型(player 和 team 通过模型 lnkteamplayer 链接)
Team has_many players through lnkteamplayer
Player has_many teams through lnkteamplayer
我需要检索所有不属于特定球队的球员。
<% @players = Player.find(:all, :conditions => ["id != ?",@team.lnkteamplayers.player_id ]) %>
上面的代码行出现错误。我的问题是如何在上述条件下传递一组值。
感谢您提供的任何建议。
【问题讨论】:
标签: ruby-on-rails