From 5f6ad00e01e3ff023176d8b090f47e62d10318fb Mon Sep 17 00:00:00 2001 From: Juliet Eyraud <103968576+juliet-e@users.noreply.github.com> Date: Wed, 28 Feb 2024 22:23:03 -0600 Subject: [PATCH] Update bulk discounts spec to add recommendation for querying --- module2/projects/bulk_discounts/index.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module2/projects/bulk_discounts/index.md b/module2/projects/bulk_discounts/index.md index 994b7c42..35accaac 100644 --- a/module2/projects/bulk_discounts/index.md +++ b/module2/projects/bulk_discounts/index.md @@ -17,7 +17,7 @@ This project is an extension of the Little Esty Shop group project. You will add ## Deets * This is a solo project, to be completed alone without assistance from cohortmates, alumni, mentors, rocks, etc. -* Must use Rails 7.0.x and Ruby 3.2.2. +* Must use Rails 7.1.x and Ruby 3.2.2. * Additional gems to be added to the project must have instructor approval. (RSpec, Capybara, Shoulda-Matchers, Orderly, HTTParty, Launchy, Faker and FactoryBot are pre-approved) * Scaffolding is not permitted on this project. * This project must be deployed to the internet. @@ -173,6 +173,8 @@ As a merchant When I visit my merchant invoice show page Then I see the total revenue for my merchant from this invoice (not including discounts) And I see the total discounted revenue for my merchant from this invoice which includes bulk discounts in the calculation + +Note: We encourage you to use as much ActiveRecord as you can, but some Ruby is okay. Instead of a single query that sums the revenue of discounted items and the revenue of non-discounted items, we recommend creating a query to find the total discount amount, and then using Ruby to subtract that discount from the total revenue. ``` ```