Sha256: 785e1db8d97774d1053f2e19a6c23062aeecf591c305b102a71f57f64c60507a

Contents?: true

Size: 286 Bytes

Versions: 27

Compression:

Stored size: 286 Bytes

Contents

class Comment
  include Mongoid::Document
  include Mongoid::Timestamps
  belongs_to :user

  field :name
  field :comment
  field :votes, :type => Integer, :default => 0

  attr_accessible :name, :comment, :user_id, :votes

  validates :name, :comment, :user_id, :presence => true
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
merit-1.7.1 test/dummy-mongoid/app/models/comment.rb
merit-1.7.0 test/dummy-mongoid/app/models/comment.rb
merit-1.6.2 test/dummy-mongoid/app/models/comment.rb
merit-1.6.1 test/dummy-mongoid/app/models/comment.rb
merit-1.6.0 test/dummy-mongoid/app/models/comment.rb
merit-1.5.0 test/dummy-mongoid/app/models/comment.rb
merit-1.4.0 test/dummy-mongoid/app/models/comment.rb
merit-1.3.1 test/dummy-mongoid/app/models/comment.rb
merit-1.3.0 test/dummy-mongoid/app/models/comment.rb
merit-1.2.3 test/dummy-mongoid/app/models/comment.rb
merit-1.2.2 test/dummy-mongoid/app/models/comment.rb
merit-1.2.1 test/dummy-mongoid/app/models/comment.rb
merit-1.2.0 test/dummy-mongoid/app/models/comment.rb
merit-1.1.2 test/dummy-mongoid/app/models/comment.rb
merit-1.1.1 test/dummy-mongoid/app/models/comment.rb
merit-1.1.0 test/dummy-mongoid/app/models/comment.rb
merit-1.0.1 test/dummy-mongoid/app/models/comment.rb
merit-1.0.0 test/dummy-mongoid/app/models/comment.rb
merit-0.10.1 test/dummy-mongoid/app/models/comment.rb
merit-0.10.0 test/dummy-mongoid/app/models/comment.rb