質問編集履歴
2
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
1
title
CHANGED
File without changes
|
body
CHANGED
@@ -17,7 +17,8 @@
|
|
17
17
|
|
18
18
|
def validate_uniqueness
|
19
19
|
#self.tags間でのユニークのバリデーション
|
20
|
+
errors[:base] << "タグが重複しています"
|
20
|
-
|
21
|
+
unless self.tags.pluck(:name).uniq.size == self.tags.count
|
21
22
|
end
|
22
23
|
end
|
23
24
|
```
|