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