mirror of
https://github.com/Growstuff/growstuff.git
synced 2025-12-24 01:57:46 -05:00
Rails 6.1 Fix warning (#2983)
* Rails 6.1 * Bump rails * Fix warning * Fix tests
This commit is contained in:
@@ -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