Sha256: df65436dc4a7a1c7022a746f3f3196e656f98d3d0f84afe3b8dfcf2e92520b25
Contents?: true
Size: 314 Bytes
Versions: 30
Compression:
Stored size: 314 Bytes
Contents
class PostWithCommentValidationsForm include ObjectAttorney represents :post, properties: [:title, :body] has_many :comments, class_name: CommentForm validates_presence_of :title def submit post.errors.add(:title, :blank) post.comments.first.errors.add(:body, :blank) false end end
Version data entries
30 entries across 30 versions & 1 rubygems