module App::Models
class Team < Base
has_many :players
[...]
end
class Player < Base
belongs_to :team
end
调用@team.players
(或@player.team
)时:
NoMethodError at /team/red
undefined method `players' for [#<App::Models::Team (...)>]:ActiveRecord::Relation
我用错了吗?