Enable the Layout/EmptyLinesAroundClassBody cop

This commit is contained in:
gregoirenovel 2017-06-12 16:01:04 +02:00
parent f1907f4d0e
commit 24e7537c49
52 changed files with 1 additions and 69 deletions

View file

@ -1,5 +1,4 @@
class EmailFormatValidator < ActiveModel::Validator
def email_regex
/\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
end

View file

@ -1,5 +1,4 @@
class ProcedurePathFormatValidator < ActiveModel::Validator
def path_regex
/^[a-z0-9_]{3,30}$/
end
@ -8,5 +7,4 @@ class ProcedurePathFormatValidator < ActiveModel::Validator
return false if record.path.blank?
record.errors[:path] << "Path invalide" unless path_regex.match(record.path)
end
end