Last active
March 31, 2021 08:48
-
-
Save alekseyl/0afc3ec3285c37e0d5b8b24311b3a070 to your computer and use it in GitHub Desktop.
Active record structure
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 style guided+ | |
#-------------------- 1. includes and extend -------------- | |
#-------------------- 2. default scope -------------------- | |
#-------------------- 3. inner classes -------------------- | |
#-------------------- 4. constants ------------------------ | |
#-------------------- 5. attr related macros -------------- | |
#-------------------- 6. enums ---------------------------- | |
#-------------------- 7. scopes --------------------------- | |
#-------------------- 8. has and belongs ------------------ | |
#-------------------- 9. accept nested macros ------------ | |
#-------------------- 10. validation ---------------------- | |
#-------------------- 11. before/after callbacks ---------- | |
#-------------------- 12. enums related macros ------------ | |
#-------------------- 13. delegate macros ----------------- | |
#-------------------- 14. other macros (like devise's) | |
#--------------------- should be placed after the callbacks | |
#-------------------- 15. public class methods ------------- | |
#-------------------- 16. instance public methods ---------- | |
#-------------------- 17. protected and private methods ---- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment