add basic support for labels

This commit is contained in:
jomo
2014-11-21 00:39:38 +01:00
parent f6c4c78752
commit 39fceedf56
8 changed files with 68 additions and 16 deletions

11
app/models/label.rb Normal file
View File

@@ -0,0 +1,11 @@
class Label < ActiveRecord::Base
validates_presence_of :name
belongs_to :role
has_and_belongs_to_many :forums
has_many :forumthreads
def to_s
name.upcase
end
end