Skip to content

Instantly share code, notes, and snippets.

@alterisian
Created June 27, 2013 13:04
Show Gist options
  • Save alterisian/5876209 to your computer and use it in GitHub Desktop.
Save alterisian/5876209 to your computer and use it in GitHub Desktop.
List rails Models in an application
#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