class TestUser < ActiveRecord::Base self.table_name = "users" end class TestItem < ActiveRecord::Base self.table_name = "items" end class TestWatching < ActiveRecord::Base self.table_name = "watchings" belongs_to :watcher, :class_name => "TestUser", :foreign_key => "user_id" belongs_to :watched_item, :class_name => "TestItem", :foreign_key => "item_id" end