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
Flamefork-shoulda-2.10.1 test/rails_root/app/models/post.rb
Flamefork-shoulda-2.10.2 test/rails_root/app/models/post.rb
auser-poolparty-1.3.0 vendor/gems/shoulda/test/rails_root/app/models/post.rb
auser-poolparty-1.3.1 vendor/gems/shoulda/test/rails_root/app/models/post.rb
auser-poolparty-1.3.10 vendor/gems/shoulda/test/rails_root/app/models/post.rb
auser-poolparty-1.3.11 vendor/gems/shoulda/test/rails_root/app/models/post.rb
auser-poolparty-1.3.12 vendor/gems/shoulda/test/rails_root/app/models/post.rb
auser-poolparty-1.3.13 vendor/gems/shoulda/test/rails_root/app/models/post.rb
auser-poolparty-1.3.14 vendor/gems/shoulda/test/rails_root/app/models/post.rb
auser-poolparty-1.3.15 vendor/gems/shoulda/test/rails_root/app/models/post.rb
auser-poolparty-1.3.16 vendor/gems/shoulda/test/rails_root/app/models/post.rb
auser-poolparty-1.3.17 vendor/gems/shoulda/test/rails_root/app/models/post.rb
auser-poolparty-1.3.2 vendor/gems/shoulda/test/rails_root/app/models/post.rb
auser-poolparty-1.3.3 vendor/gems/shoulda/test/rails_root/app/models/post.rb
auser-poolparty-1.3.4 vendor/gems/shoulda/test/rails_root/app/models/post.rb
auser-poolparty-1.3.5 vendor/gems/shoulda/test/rails_root/app/models/post.rb
auser-poolparty-1.3.6 vendor/gems/shoulda/test/rails_root/app/models/post.rb
auser-poolparty-1.3.7 vendor/gems/shoulda/test/rails_root/app/models/post.rb
auser-poolparty-1.3.8 vendor/gems/shoulda/test/rails_root/app/models/post.rb
carlosbrando-remarkable-0.0.99 spec/rails_root/app/models/post.rb