在我的模型中的 ruby on rails 项目中,我有一些定义。
class PlaySport < ActiveRecord::Base
belongs_to :user
belongs_to :sport
def self.getLevel
end
def self.check_play_sport(cuser_id,sport_id)
end
def current_playing_sports
end
def all_played_sports
end
end
我抓住这样的关系
current_user.play_sports.current_playing_sports
但我得到未定义的方法错误“current_playing_sports”
怎么了?