Sha256: 2ba80258bdf2bb672fbe16753c37b86aa58cb7cac129ef756729ed48b21ec2f7

Contents?: true

Size: 415 Bytes

Versions: 105

Compression:

Stored size: 415 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

105 entries across 105 versions & 20 rubygems

Version Path
poolparty-1.3.7 vendor/gems/shoulda/test/rails_root/app/models/post.rb
poolparty-1.3.6 vendor/gems/shoulda/test/rails_root/app/models/post.rb
poolparty-1.3.4 vendor/gems/shoulda/test/rails_root/app/models/post.rb
poolparty-1.3.3 vendor/gems/shoulda/test/rails_root/app/models/post.rb
poolparty-1.3.1 vendor/gems/shoulda/test/rails_root/app/models/post.rb