Skip to content

Instantly share code, notes, and snippets.

@ota42y
Last active October 30, 2019 15:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ota42y/b3c13508e878bdf47802489177e51955 to your computer and use it in GitHub Desktop.
Save ota42y/b3c13508e878bdf47802489177e51955 to your computer and use it in GitHub Desktop.
# return path for validation, if return nil we doesn't validation
def validation_path_hook(request)
# only
# request.path.start_with?('/something') ? request.path : nil
# except
# request.path.start_with?('/something') ? nil : request.path
# prefix option (/v1/test => /test)
# request.path.gsub(/^\/v1/, "")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment