Episodes
mark.nelson PRO said 3 months ago on Shopping Cart with Turbo :
Very nicely thought out and presented. Thank you.

diazgio PRO said 3 months ago on Shopping Cart with Turbo :
When I try to run the project locally gives me an error that don't fine in stylesheet the main css aplication.css?

David Kimura PRO said 3 months ago on Shopping Cart with Turbo :
  diazgio How are you starting the application. I just downloaded the project, ran

bundle install
yarn install
bin/dev

and it started up the application without any issues. If you run the seeds, you may need to add this to various places since I did seed the records initially without the images.
if product.image.attached?

diazgio PRO said 3 months ago on Shopping Cart with Turbo :
Thanks for the answer

AhmedNadar PRO said 3 months ago on Shopping Cart with Turbo :
Wonderful episode as usual David.

Inside `_display` partial I add a `link_to` to show product show view, but it doesn't work. But when I add `turbo_frame: _top` it works which is not an ideal solution.

<%= turbo_frame_tag "products_display" do %>
 <%= content_tag :div, id: dom_id(product) do %>
  <%= link_to product_path(product), data: {turbo_frame:"_top"} do %>
   .......
  <% end %>
 <% end %>
<% end %>

Any idea on how to keep link_to execute by hotwire?
Thanks...

Lucinex PRO said 3 months ago on Shopping Cart with Turbo :
What drove the decision behind this line of code:
        cart_item.quantity = [cart_item.quantity - 1, 1].max

Is it written like that to avoid using a conditional? For performance reasons? Both?

David Kimura PRO said 3 months ago on Shopping Cart with Turbo :
It's just a preference for than anything. I could have a conditional, but this felt cleaner.

muddin13 PRO said 18 days ago on Shopping Cart with Turbo :
I am new here. I can see the code writing started straight away. Wondering where is the base code to start?

David Kimura PRO said 18 days ago on Shopping Cart with Turbo :
I create each episode from a template which can be found at https://github.com/driftingruby/template

Honestly, the template if very bare. It uses esbuild/css-bundling (see the README) and installs bootstrap with a very simple layout with a navigation bar. That's really all the template does.

muddin13 PRO said 18 days ago on Shopping Cart with Turbo :
Nice one. Thanks  David Kimura

muddin13 PRO said 16 days ago on Shopping Cart with Turbo :
Awesome episode  David Kimura ! Like the way you explain the code while you write. Very clear explanation.

Login to Comment