How can I have two columns in one table point to the same column in another with ActiveRecord?
I run the risk of palm-to-forehead here, but I can't quite figure out how to do this with Rails' ActiveRecord sugar. I have a tickets table that has two columns ( submitter_id and assignee_id ) that should each reference a different user from the users table (specifically the id column in the users table). I'd like to be able to do things like ticket.submitter.name and ticket.assignee.email using ActiveRecord's associations. Submitter and Assignee are simply user objects under different associative names. The only thing I've found that comes close to what I am doing is using polymorphic