Created
June 27, 2013 13:04
-
-
Save alterisian/5876209 to your computer and use it in GitHub Desktop.
List rails Models in an application
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
#otherwise this list isn't going to contain all models. | |
Rails.application.eager_load! | |
ActiveRecord::Base.descendants.each do |model| | |
puts model.name | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment