Sha256: c942666f8080d0b539633f496b985cffd43ca04e67ab8f87ee8dc65c2a63e0f1
Contents?: true
Size: 278 Bytes
Versions: 30
Compression:
Stored size: 278 Bytes
Contents
class PostValidationsForm include ObjectAttorney represents :post, properties: [:title, :body] has_many :comments 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