Added validation for length of forum title.

This commit is contained in:
Logan Fick
2017-10-28 21:06:48 -04:00
parent 82b4dd5280
commit 7520efb683

View File

@@ -4,6 +4,7 @@ class Forum < ActiveRecord::Base
belongs_to :role_read, class_name: "Role", foreign_key: "role_read_id"
belongs_to :role_write, class_name: "Role", foreign_key: "role_write_id"
has_and_belongs_to_many :labels
validates_length_of :name, in: 2..30
def to_s
name