我有这样的模型:Post、TextPost和PhotoPost,我使用多态关联。class Post < ActiveRecord::Base default_scope { order ("created_at DESC"::Baseend
我想要的是,当用户分别提交text_post或photo_post时,验
article.errors.full_messages.each do |msg| %> <% end %> <% end %>
上面是我的表单的一个片段,我可以访问文章的验证,例如: validates_presence of :author,:title,但是我无法访问我为nested_attributes设置的<