Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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