David Kimura PRO
Joined 7/18/2015
Drifting Ruby Owner
David Kimura PRO said almost 6 years ago on Autocomplete with StimulusJS :
  You can just modify the content tag into a block.

<%= content_tag :li, role: :option, data: { 'autocomplete-value': product.id } do %>
  <%= product.name %> |
  <%= product.price %> |
  ...
<% end %>

David Kimura PRO said almost 6 years ago on Creating PDF files with WickedPDF :
  This is an exert from their documentation examples.

pdf = WickedPdf.new.pdf_from_string(
  render_to_string('templates/pdf', layout: 'pdfs/layout_pdf.html'),
  footer: {
    content: render_to_string(
  		'templates/footer',
  		layout: 'pdfs/layout_pdf.html'
  	)
  }
)

Notice that the footer is being passed as a second parameter to the WickedPdf.new.pdf_from_string. In your example, it is getting passed into the first parameter and not the additional options.

David Kimura PRO said almost 6 years ago on Autocomplete with StimulusJS :
  Which database backend are you using? MySQL should automatically do a case-insensitive search.

If using postgresql, you can use ILIKE instead of LIKE

David Kimura PRO said almost 6 years ago on Publish and Subscribe to Events :
  I would probably use ActionCable or something similar like that to do view updates.

David Kimura PRO said almost 6 years ago on Progressive Render :
  I would probably look into Stimulus Reflex for something similar. Sounds like it could make for a good episode!