From 90193ef5bb4b612b2c75455626738cfc3a32e914 Mon Sep 17 00:00:00 2001 From: Zee Spencer <50284+zspencer@users.noreply.github.com> Date: Sat, 6 May 2023 12:47:55 -0700 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20`Marketplace`:=20Show=20`Product::P?= =?UTF-8?q?hoto`=20in=20`Cart`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - https://github.com/zinc-collective/convene/issues/1428 - https://github.com/zinc-collective/convene/issues/1326 A quick insertion of the photos into the cart view. We probably should do a broader redesign pass on the `Cart` UI :soon: but this seems decent enough? --- app/controllers/application_controller.rb | 3 ++ .../cart_products/_cart_product.html.erb | 35 +++++++++++++------ 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 9d3b96e3d..9db15bd21 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -17,6 +17,9 @@ class ApplicationController < ActionController::Base protect_from_forgery with: :exception, unless: -> { api_request? } + # @see https://til.hashrocket.com/posts/3exmhtwqy6-setting-the-urloptions-hash-in-the-controller + include ActiveStorage::SetCurrent + # Referenced in application layout to display page title # Override on a per-controller basis to display different title # @return [String] diff --git a/app/furniture/marketplace/cart_products/_cart_product.html.erb b/app/furniture/marketplace/cart_products/_cart_product.html.erb index ad0b7c30b..7cbdacc56 100644 --- a/app/furniture/marketplace/cart_products/_cart_product.html.erb +++ b/app/furniture/marketplace/cart_products/_cart_product.html.erb @@ -1,8 +1,19 @@ <%- product = cart_product.product %> <%- cart = cart_product.cart %> -