mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-09-21 13:34:54 -04:00
Rails 6.1 Fix warning (#2983)
* Rails 6.1 * Bump rails * Fix warning * Fix tests
This commit is contained in:
1 parent
99b11c3eb6
commit
07d40a20dd
1 file changed
+1
-1
@@ -2,6 +2,6 @@
|
||||
|
||||
class ApprovedValidator < ActiveModel::EachValidator
|
||||
def validate_each(record, attribute, _value)
|
||||
record.errors[attribute] << (options[:message] || 'must be approved') unless record.crop.try(:approved?)
|
||||
record.errors.add(attribute, options[:message] || 'must be approved') unless record.crop.try(:approved?)
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user