Skip to content

Instantly share code, notes, and snippets.

@elikem
Forked from metalelf0/rails_model_template.rb
Created April 14, 2023 22:59
Show Gist options
  • Select an option

  • Save elikem/42724a09801d97e3afdee61539d5df2b to your computer and use it in GitHub Desktop.

Select an option

Save elikem/42724a09801d97e3afdee61539d5df2b to your computer and use it in GitHub Desktop.
A rails model template to better organize your code
# provided by https://www.zmwolski.com/Organizing-Ruby-on-Rails-Models
class User < ActiveRecord::Base
# == Constants ============================================================
# == Attributes ===========================================================
# == Extensions ===========================================================
# == Relationships ========================================================
# == Validations ==========================================================
# == Scopes ===============================================================
# == Callbacks ============================================================
# == Class Methods ========================================================
# == Instance Methods =====================================================
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment