🕵️♀️ Task
The count method allows us to calculate the specific number of records that exist within an ActiveRecord::Relation.
count
ActiveRecord::Relation
LevelUp
Selecting all records
Find one record by primary...
Counting records
Find record via index
Find record by position us...
Order records by column va...
Retrieving values from col...
Retrieve all values from a...
Limit number of selected r...
Offset selected records
Filtering records with whe...
Exclude records from result
Calculate minimum value in...
Calculate maximum value in...
Calculate average value in...
Calculate sum of values in...
Find the "many" side of a ...
Find the "one" side of one...
Many-to-many associations ...
0.0% complete
Count how many records are in the customers table.
Customer.all.count => 327
Count how many records are in the products table.
Product.all.count => 183946