Specify the class name of the association. Use it only if that name can’t be inferred from the association name. So belongs_to :author will by default be linked to the Author class, but if the real class name is Person, you’ll have to specify it with this option.
has_many :test, class_name: whatever, foreign_key: 'test_id'
ref : http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html