Skip to content

Instantly share code, notes, and snippets.

View jjf21's full-sized avatar
πŸ„β€β™‚οΈ
Hubflo-ing

Carl Quivron jjf21

πŸ„β€β™‚οΈ
Hubflo-ing
View GitHub Profile
@kylefox
kylefox / find_unused_helpers.rb
Created March 28, 2019 21:49 — forked from kennethkalmer/find_unused_helpers.rb
Find unused helpers in a Rails app
#!/usr/bin/env ruby
#
# Shotgun approach (read: slow and dirty hack) to help find unused helpers in a Rails application
#
start = Time.now
# Build an array of filename globs to process.
# Only search file types that might use or define a helper.
extensions = %w[rb js haml erb jbuilder].map { |ext| "app/**/**/*.#{ext}" }