Skip to content

Commit eeadc1c

Browse files
salzigJoschkaSchulz
authored andcommitted
fix: [#798] validate Topic.name length
1 parent 8998497 commit eeadc1c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/models/topic.rb

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ class Topic < ApplicationRecord
88
PROPOSAL_TYPES = %w[proposal enquiry].freeze
99
validates :user, :name, :description, :label, presence: true
1010
validates :proposal_type, inclusion: { in: PROPOSAL_TYPES }
11+
validates :name, length: { maximum: 255 }
1112

1213
belongs_to :user
1314
belongs_to :event, optional: true

0 commit comments

Comments
 (0)