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
carlosbrando-remarkable-2.2.1 spec/rails_root/app/models/post.rb
emschwar-shoulda-2.0.6.1 test/rails_root/app/models/post.rb
fairchild-poolparty-1.3.17 vendor/gems/shoulda/test/rails_root/app/models/post.rb
fairchild-poolparty-1.3.5 vendor/gems/shoulda/test/rails_root/app/models/post.rb
francois-shoulda-2.0.5.1 test/rails_root/app/models/post.rb
francois-shoulda-2.0.5.2 test/rails_root/app/models/post.rb
francois-shoulda-2.0.5.4 test/rails_root/app/models/post.rb
francois-shoulda-2.10.1 test/rails_root/app/models/post.rb
gsterndale-warrant-0.2.0 test/rails_root/vendor/gems/thoughtbot-shoulda-2.0.6/test/rails_root/app/models/post.rb
gsterndale-warrant-0.3.0 test/rails_root/vendor/gems/thoughtbot-shoulda-2.0.6/test/rails_root/app/models/post.rb
hashrocket-clearance-0.4.0 test/rails_root/vendor/gems/thoughtbot-shoulda-2.0.4/test/rails_root/app/models/post.rb
hashrocket-clearance-0.4.1 test/rails_root/vendor/gems/thoughtbot-shoulda-2.0.4/test/rails_root/app/models/post.rb
hashrocket-clearance-0.4.2 test/rails_root/vendor/gems/thoughtbot-shoulda-2.0.4/test/rails_root/app/models/post.rb
hashrocket-clearance-0.4.3 test/rails_root/vendor/gems/thoughtbot-shoulda-2.0.4/test/rails_root/app/models/post.rb
iGEL-shoulda-2.10.2 test/rails_root/app/models/post.rb
mattknox-goaloc-0.3.0 lib/goaloc/generators/resources/shoulda/test/rails_root/app/models/post.rb
mattknox-goaloc-0.4.0 lib/goaloc/generators/resources/shoulda/test/rails_root/app/models/post.rb
mjankowski-shoulda-2.0.4 test/rails_root/app/models/post.rb
mjankowski-shoulda-2.0.5 test/rails_root/app/models/post.rb
ratnikov-shoulda-2.0.6.1 test/rails_root/app/models/post.rb