2006/3/8, Duane Johnson <[EMAIL PROTECTED]>:
> I've also come up to this oddity and I'd like to know the answer to
> the questions pose--is the author of the original code present, or an
> otherwise knowledgeable person who could answer?

Ok, I found the solution:

http://blog.teksol.info/articles/2006/03/08/do-not-validate-belongs_to-or-else

Summary:

class Child < AR::Base
  validates_presence_of :parent_id
end

NOT

class Child < AR::Base
  validates_presence_of :parent
end

Bye !
--
François Beausoleil
http://blog.teksol.info/
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to