Tag: ruby on rails web development company

RoR Active Record Validations

This tutorial will teach you how to validate the state of objects before they are sent to the database using Active Record’s validation feature. After reading the guide, you will know: How to use the built-in Active Record validation helpers How to create your own validation methods How to deal with error messages generated during […]

Modifying Existing Migrations in Ruby

Periodically, you will make mistakes when writing migrations. If you’ve already run a migration, you can’t just edit the migration and run it again: Rails will assume it has already run a migration and will do nothing when you run rails db:migrate. You must rollback the migration (using bin/rails db:rollback, for example), edit the migration, […]