Sha256: 329104e90049e6ca6f123e9befcbbebfef475ea28a3cba853f071577ace5d62f
Contents?: true
Size: 412 Bytes
Versions: 187
Compression:
Stored size: 412 Bytes
Contents
class Post < ActiveRecord::Base belongs_to :user belongs_to :owner, :foreign_key => :user_id, :class_name => 'User' has_many :taggings has_many :tags, :through => :taggings has_many :through_tags, :through => :taggings, :source => :tag validates_uniqueness_of :title validates_presence_of :title validates_presence_of :body, :message => 'Seriously, wtf' validates_numericality_of :user_id end
Version data entries
187 entries across 66 versions & 12 rubygems