DAddYE/mini_record — pull request #28 by virtax (2013-06-20 15:03:54+00:00)
Title: Support for custom ':foreign_key' option in the 'belongs_to' used with 'index ..., :foreign=>true' was added.

For example:

class Book < ActiveRecord::Base
belongs_to :second_publisher, :foreign_key => 'second_publisher_id', :class_name => 'Publisher'
index :second_publisher_id, :foreign => true
end