Last active
March 4, 2020 20:29
-
-
Save pedryvo/507101a046960cdc3d92a38c3d7c05ac 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
# List all models | |
ActiveRecord::Base.connection.tables.map do |model| | |
model.capitalize.singularize.camelize | |
end | |
# Get all associations of a model | |
User.reflect_on_all_associations |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment