asciinema.org/app/models/comment.rb

13 lines
250 B
Ruby
Raw Normal View History

2012-03-01 23:25:55 +00:00
class Comment < ActiveRecord::Base
validates :body, :presence => true
2012-11-19 21:35:52 +00:00
validates :asciicast, :presence => true
validates :user, :presence => true
2012-03-01 23:25:55 +00:00
belongs_to :user
2012-04-09 14:46:08 +00:00
belongs_to :asciicast, :counter_cache => true
2012-03-01 23:25:55 +00:00
2012-03-03 12:09:04 +00:00
attr_accessible :body
2012-03-01 23:25:55 +00:00
end