I have these models:
class Vote < ActiveRecord::Base
belongs_to :core
belongs_to :user_id
end
class User < Core
has_many :votes
end
class Core < ActiveRecord::Base
has_many :votes
end
the tables in db are:
cores(id,name)
votes(id,core_id,user_id,vote)
when i do some query to votes, the attribute core_id is confused with
user_id.
(core_id is the user or others objects that are voted, user_id is the
voter)
How i can do to distinct the voter and the user voted?
Thanks