Sha256: d79db0296251885cd0df9d1986359b842298f983a34a724524bc24e4a662445e
Contents?: true
Size: 358 Bytes
Versions: 160
Compression:
Stored size: 358 Bytes
Contents
class Post < ActiveRecord::Base validates :name, :presence => true validates :title, :presence => true, :length => { :minimum => 5 } has_many :comments, :dependent => :destroy has_many :tags accepts_nested_attributes_for :tags, :allow_destroy => :true, :reject_if => proc { |attrs| attrs.all? { |k, v| v.blank? } } end
Version data entries
160 entries across 121 versions & 19 rubygems