© 2024. MIT License.
App vs Lib
Avoid environment based conditionals
Use tag helpers rather than strings to assemble HTML
Build views with view components
Prefer CRUD actions in controllers
Avoid rescuing StandardError
Don’t misuse modules and concerns
Make small, atomic Sidekiq jobs
Avoid using instance variables in view partials and helpers
Only store ephemeral objects in the cache
Hyphenated URL paths
Prefer constant lookups over constantize
constantize
Handle errors using Rails.error
Prefer Sidekiq
Avoid querying sets of objects from models/controllers
Send Segment events inline rather than in background jobs
Avoid ActiveRecord callbacks
Set a TTL on every cached object
Avoid creating static references to record instances
Two step deploy when table is being dropped and references to it are being removed
Use Citext extension for Case InSensitive Columns
Use namespacing for apps and events
Use null object pattern to simplify code around guest users
Use one service object per endpoint
Validate correctly on the edge of the app