dev
Joined 6/19/2021
dev said almost 3 years ago on Hotwire Dashboards :
Thank you. Helpful stuff!

The source code for displaying random images is lost somewhere)


dev said over 2 years ago on Infinite Scrolling with Hotwire :
To prevent endless, looping from the last element of the collection to the first element
(Approach 2 - no-JS)

<%= turbo_stream.append "posts" do %>
   <%= render partial: "posts/post", collection: @posts %>
 <% end %>
<% unless @pagy.page == @pagy.last %>
  <%= turbo_stream.replace "pagination" do %>
    <%= turbo_frame_tag "pagination", src: posts_path(page: @pagy.next, format: :turbo_stream), loading: :lazy %>
  <% end %>
<% end %>


To reset the infinite list and clear the page params:
(Approach 1 - Stimulus Controller)

  <%= link_to 'Posts', root_path(only_path: true), class: 'text-decoration-none text-reset fs-2' %>

dev said over 2 years ago on Label Maker with Ruby :
very unique, out-of-the-box episode!

dev said about 2 years ago on Slim Select with Stimulus :
Rails 7 with importmap
1) in Terminal
bin/importmap pin slim-select
or
bin/importmap pin slim-select --download 

2) Add css (3 variants)
- add to app/views/layouts/application.html.erb
<%= stylesheet_link_tag "https://cdnjs.cloudflare.com/ajax/libs/slim-select/1.27.1/slimselect.min.css", "data-turbo-track": "reload" %>
or
- in rails console
`curl https://cdnjs.cloudflare.com/ajax/libs/slim-select/1.27.1/slimselect.min.css --output "#{Rails.root.join('app', 'assets', 'stylesheets')}/slimsel
ect.min.css"`
or
- add to app/assets/stylesheets/application.css
@import url("https://cdnjs.cloudflare.com/ajax/libs/slim-select/1.27.1/slimselect.min.css");


dev said almost 2 years ago on Creating Embedded Iframes :
good episode. thanks!