weird behavior of belongs_to referencing a model with set_table_name

Hello all,

I am experiencing some really weird behavior of belongs_to with a model where the table name is set by set_table_name

I have two simple models:

=== file legal_entity.rb

class LegalEntity < ActiveRecord::Base

set_table_name ‘legalentities’


=== file legal_entity_person.rb

class LegalEntityPerson < ActiveRecord::Base

set_table_name ‘legalentities_people’

belongs_to :legal_entity, :foreign_key => ’ legalentity_id’