Created
November 26, 2008 06:58
-
-
Save qrush/29315 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you ever needed an array of all models in your Rails app (+ Session) | |
Dir.glob("app/models/*.rb").each{|r| require r}; subclasses_of(ActiveRecord::Base).map{|c| c.class_name} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment