cleaned up, added threadreplies, added info

This commit is contained in:
jomo
2014-04-20 03:07:39 +02:00
parent 097f9b1ba4
commit cbafa3c46a
24 changed files with 354 additions and 132 deletions

View File

@@ -1,5 +1,7 @@
class Comment < ActiveRecord::Base
belongs_to :user_author, class_name: "User", foreign_key: "user_author_id"
belongs_to :user_editor, class_name: "User", foreign_key: "user_editor_id"
validates_presence_of :content, :author, :blogpost
validates_length_of :content, in: 4..1000

6
app/models/info.rb Normal file
View File

@@ -0,0 +1,6 @@
class Info < ActiveRecord::Base
self.table_name = "info"
validates_presence_of :title, :content
end