Skip to content
Snippets Groups Projects
Commit b57a75b1 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

merci sebouchu

parent d1134bdd
No related branches found
No related tags found
No related merge requests found
......@@ -75,13 +75,7 @@ module Communication::Website::Page::WithPath
end
def slug_must_have_proper_format
# TODO method equivalent of:
# validates :slug,
# format: {
# with: /\A[a-z0-9\-]+\z/,
# message: I18n.t('slug_error')
# },
# unless: :kind_home?
errors.add(:slug, I18n.t('slug_error')) unless /\A[a-z0-9\-]+\z/.match?(slug)
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment