Last active
November 25, 2022 10:24
-
-
Save route/4540032 to your computer and use it in GitHub Desktop.
AR template
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
class Example < ActiveRecord::Base | |
## includes | |
## plugins | |
## associations | |
## validations | |
## callbacks | |
## attr_*, delegate aliases, accepts_nested_attributes_for | |
## scopes | |
## class methods | |
## public methods | |
## protected methods | |
## private methods | |
end |
Put it wherever you need it :) I think it fits good after callbacks since basically it creates public methods or maybe even in plugin section because feels like a plugin... This is just in order to prevent total mess up in models since everybody wants it his way :) Basically as you discuss it with your team.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Where does
accepts_nested_attributes_for
fit into?