I used an image here to show properly what my editor displays because I am not sure how it displays in the browser.
# frozen_string_literal: true @cars = @cars.where(<<~SQL.squish, free: free_text) regnr ILIKE :free OR carname ILIKE :free OR fuel ILIKE :free OR gearb ILIKE :free OR manufacturer ILIKE :free SQL <<~HTML.squish <div class="btn btn-primary btn-sm"> Filter </div> HTML <<~CSS.squish .search-count { color: #888; font-style: italic; } CSS