From 043fafdb4dc9baff23d7f670aa6a682d4a94ca60 Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Wed, 2 Apr 2008 15:34:06 +0000 Subject: [PATCH] ActionItem237: fixed a long-time problem when loading Person class without loading Profile first. That's why you should specify class_name as strings and not by using the class object. --- app/models/article.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/article.rb b/app/models/article.rb index 7fd03e2..964cb81 100644 --- a/app/models/article.rb +++ b/app/models/article.rb @@ -5,7 +5,7 @@ class Article < ActiveRecord::Base validates_uniqueness_of :slug, :scope => ['profile_id', 'parent_id'], :message => _('%{fn} (the code generated from the article name) is already being used by another article.') - belongs_to :last_changed_by, :class_name => Person.name, :foreign_key => 'last_changed_by_id' + belongs_to :last_changed_by, :class_name => 'Person', :foreign_key => 'last_changed_by_id' has_many :comments, :dependent => :destroy -- libgit2 0.21.2