validate max length of forum topic
This commit is contained in:
@@ -25,6 +25,7 @@ class ForumTopic < ActiveRecord::Base
|
|||||||
validates_associated :original_post
|
validates_associated :original_post
|
||||||
validates_inclusion_of :category_id, :in => CATEGORIES.keys
|
validates_inclusion_of :category_id, :in => CATEGORIES.keys
|
||||||
validates_inclusion_of :min_level, :in => MIN_LEVELS.values
|
validates_inclusion_of :min_level, :in => MIN_LEVELS.values
|
||||||
|
validates :title, :length => {:maximum => 255}
|
||||||
accepts_nested_attributes_for :original_post
|
accepts_nested_attributes_for :original_post
|
||||||
after_update :update_orignal_post
|
after_update :update_orignal_post
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user