MODELS & VALIDATIONS
2.0

— ActiveRecord Validations Cheatsheet

POSTED ABOUT 1 YEAR AGO

Comprehensive but concise details of Rails' built-in class validation helper methods from validates_acceptance_of through to validates_uniqueness_of, along with details of how to roll your own low-level validations along with examples...

Html * HTML

Pdf * PDF (215 KB)

MODELS & HELPERS
2.0

— Active Record Validation Errors Cheatsheet

POSTED ABOUT 1 YEAR AGO

Each ActiveRecord backed model in Rails has an errors object which errors are added to if the model fails validation. This cheatsheet covers methods available, default errors messages and view error helpers.

Html * HTML

Pdf * PDF (200.7 KB)