Created
March 17, 2016 07:55
-
-
Save lissdy/b054a663fbb282d8fa3f 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
Rails.application.paths["app/models"].each{|model_path| | |
Dir["#{Rails.root}/#{model_path}/*/*.rb"].each { |file| require file } | |
} | |
models = ActiveRecord::Base.send(:subclasses) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment