This commit is contained in:
jomo
2013-10-21 05:45:54 +02:00
parent 49b2231047
commit bfe9a1e6f5
14 changed files with 107 additions and 46 deletions

View File

@@ -3,6 +3,11 @@ class Forumthread < 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"
attr_accessible :name, :content, :sticky, :locked, :user_author, :user_editor, :forum
validates_presence_of :name
validates_presence_of :content
def to_s
name
end