Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lujanfernaud/7975a285df59558f69642b7dc3548e5c to your computer and use it in GitHub Desktop.
Save lujanfernaud/7975a285df59558f69642b7dc3548e5c to your computer and use it in GitHub Desktop.
Ruby: Require All Files Within a Directory

Ruby: Require All Files Within a Directory

Dir[File.expand_path('../config/routes/*.rb', __dir__)].each do |file|
  require_relative file
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment