Validate plain old Ruby objects with Active Model Validations
A while ago I wrote about creating a landing page with Sinatra, Google Spreadsheets and Ruby. The app had a flaw though, any user data was valid and would post through to the spreadsheet. So here’s how to validate user data in plain old ruby objects using ActiveModel::Validations.
Post a comment