We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1cf3cae + c5444ed commit b527ec5Copy full SHA for b527ec5
app/models/text_field_type.rb
@@ -36,8 +36,8 @@ def text_length
36
end
37
38
def text_unique
39
- unless Field.find_by_name(field_info.name).field_items.jsonb_contains(:data, text: text).empty?
40
- errors.add(:text, "#{field_info.name} Must be unique")
+ unless field.field_items.jsonb_contains(:data, text: text).empty?
+ errors.add(:text, "#{field.name} Must be unique")
41
42
43
0 commit comments