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

Version Path
apl-library-0.0.90 vendor/bundle/ruby/1.9.1/gems/shoulda-2.11.3/test/rails3_root/app/models/post.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.9.1/gems/shoulda-2.11.3/test/rails2_root/app/models/post.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/2.1.0/gems/shoulda-2.11.3/test/rails2_root/app/models/post.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/2.1.0/gems/shoulda-2.11.3/test/rails3_root/app/models/post.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.9.1/gems/shoulda-2.11.3/test/rails3_root/app/models/post.rb
apl-library-0.0.90 vendor/bundle/ruby/1.9.1/gems/shoulda-2.11.3/test/rails2_root/app/models/post.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/shoulda-2.11.3/test/rails3_root/app/models/post.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/shoulda-2.11.3/test/rails2_root/app/models/post.rb
dirty_history-0.7.3 dirty_history/ruby/1.9.1/gems/shoulda-2.11.3/test/rails3_root/app/models/post.rb
dirty_history-0.7.3 dirty_history/ruby/1.9.1/gems/shoulda-2.11.3/test/rails2_root/app/models/post.rb
dirty_history-0.7.2 dirty_history/ruby/1.9.1/gems/shoulda-2.11.3/test/rails2_root/app/models/post.rb
dirty_history-0.7.2 dirty_history/ruby/1.9.1/gems/shoulda-2.11.3/test/rails3_root/app/models/post.rb
dirty_history-0.7.1 dirty_history/ruby/1.9.1/gems/shoulda-2.11.3/test/rails3_root/app/models/post.rb
dirty_history-0.7.1 dirty_history/ruby/1.9.1/gems/shoulda-2.11.3/test/rails2_root/app/models/post.rb
dirty_history-0.7.0 dirty_history/ruby/1.9.1/gems/shoulda-2.11.3/test/rails2_root/app/models/post.rb
dirty_history-0.7.0 dirty_history/ruby/1.9.1/gems/shoulda-2.11.3/test/rails3_root/app/models/post.rb
dirty_history-0.6.7 dirty_history/ruby/1.9.1/gems/shoulda-2.11.3/test/rails2_root/app/models/post.rb
dirty_history-0.6.7 dirty_history/ruby/1.9.1/gems/shoulda-2.11.3/test/rails3_root/app/models/post.rb
dirty_history-0.6.6 dirty_history/ruby/1.9.1/gems/shoulda-2.11.3/test/rails3_root/app/models/post.rb
dirty_history-0.6.6 dirty_history/ruby/1.9.1/gems/shoulda-2.11.3/test/rails2_root/app/models/post.rb