Skip to content

Instantly share code, notes, and snippets.

@deevis
Last active December 21, 2015 18:19
Show Gist options
  • Save deevis/6346943 to your computer and use it in GitHub Desktop.
Save deevis/6346943 to your computer and use it in GitHub Desktop.
Reload Rails Controllers and/or Models
# Controllers
Dir["#{Rails.root}/../pyr/*/app/controllers/**/*.rb"].each{|p| puts "require #{p}";require p};nil
# Models
Dir["#{Rails.root}/../pyr/*/app/models/**/*.rb"].each{|p| puts "require #{p}";require p};nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment