David Kimura PRO
Joined 7/18/2015
Drifting Ruby Owner
Ruby Rogues Panelist
David Kimura PRO said over 4 years ago on MultiTenant Payment Processing :
This episode should be released on July 26,2020.

David Kimura PRO said over 4 years ago on Sorting from Scratch :
  If we just searched by column then when we moved an item from one column to a different one, it wouldn't be found. That's why we have to search based on the list instead of the column.

David Kimura PRO said over 4 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 over 4 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 over 4 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