Skip to content

Commit 039ff61

Browse files
committed
Allow to set Dojo tags more than 5
1 parent 2aff417 commit 039ff61

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

app/models/dojo.rb

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ class Dojo < ApplicationRecord
2323
validates :description, presence: true, length: { maximum: 50 }
2424
validates :logo, presence: false
2525
validates :tags, presence: true
26-
validate :number_of_tags
2726
validates :url, presence: true
27+
#validate :number_of_tags
2828

2929
class << self
3030
def load_attributes_from_yaml
@@ -69,10 +69,12 @@ def annual_count(period)
6969

7070
private
7171

72-
def number_of_tags
73-
num_of_tags = self.tags.length
74-
if num_of_tags > 5
75-
errors.add(:number_of_tags, 'should be 1 to 5')
76-
end
77-
end
72+
# Now 6+ tags are available since this PR:
73+
# https://github.com/coderdojo-japan/coderdojo.jp/pull/1697
74+
#def number_of_tags
75+
# num_of_tags = self.tags.length
76+
# if num_of_tags > 5
77+
# errors.add(:number_of_tags, 'should be 1 to 5')
78+
# end
79+
#end
7880
end

0 commit comments

Comments
 (0)