Relacje modeli i validacja

Dzisiaj same problemy, już mnie to zaczyna irytować :wink:

Mam model Articles, ArticleContent - Kazdy article has_one ArticleContent => Article content belongs_to Article

[code=ruby]class Article < ActiveRecord::Base
has_one :content,
:class_name => ‘ArticleContent’

validates_presence_of :title, :category_id, :content

end[/code]

class ArticleContent < ActiveRecord::Base belongs_to :article validates_presence_of :text, :short_text end
no i jest kicha - co mam zrobić żeby przy dodawaniu artykułu walidowało mi czy content.text i content.shotr_text sa wpisane? teraz jak nie wpisze contentu to przechodzi walidacje bez problemu mimo ze mam :content na liscie walidacyjnej…

EDIT: juz rozwiazalem problem: validates_associated :content