June 2024
Intermediate to advanced
456 pages
11h 34m
English
Let’s look at some command-line tools provided as Ruby gems that have been added to Rideshare.
Rideshare uses the active_record_doctor[104] gem to analyze the database and the application code.
To run it, go to your terminal and run bin/rake active_record_doctor from the Rideshare directory. This runs the built-in checks and makes recommendations.
One of the checks compares the column types between the primary key and foreign key columns to make sure they match. Some mismatches exist in Rideshare now, so try running the tool and finding them. Feel free to fix them in your local copy.
Validations defined in models are also compared against database constraints. For example, when a uniqueness validation ...
Read now
Unlock full access