mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 11:16:00 +02:00
fixed codeclimate errors (partically)
This commit is contained in:
parent
3f41ce4ab4
commit
f4e0084895
103 changed files with 339 additions and 367 deletions
|
@ -1,8 +1,6 @@
|
|||
class Iso8601Validator < ActiveModel::EachValidator
|
||||
def validate_each(record, attribute, value)
|
||||
if options[:date_only]
|
||||
record.errors.add(attribute, :invalid_iso8601_date) unless value =~ date_format
|
||||
end
|
||||
record.errors.add(attribute, :invalid_iso8601_date) if options[:date_only] && value !~ date_format
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue