Here is my STI Models:
class User < ActiveRecord::Base
end
class Athlete < User
has_many :sports, :through => :user_sports
has_many :user_sports
end
class Coach < User
end
The UserSports
table has user_id
and sport_id
... but then you run this:
athlete = Athlete.all.last
athlete.sports
The SQL that is generated is trying to use the athlete_id
instead of the user_id
... not too sure what I am doing wrong here... any suggestions would be greatful!