download file from public in Rails

that is prevent browser from opening it instead.

view:

= link_to 'google.html',
  download_google_verification_file_site_diy_url(site),
  'data-no-turbolink': true,
  class: 'file'

controller:

def download_google_verification_file
  file_path = Rails.root.join('public', 'google.html')
  send_file file_path, disposition: 'attachment'
end