How can I join the same 2 models twice in Rails?
问题 I have an app with country preferences. A user will have 2 types of country preferences - event and research. In the future there may be more. I was leaning more towards having 2 tables to represent this over using STI. I'm having a bit of trouble configuring Rails elegantly to do this. I could hack it but I would rather do this by Rails convention. What I want is something like this: class User < ActiveRecord::Base has_many event_countries, :through => :event_countries, :class_name =>