You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: form_search_helper.rb
    path of file: ./repos/e621ng/app/helpers
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module FormSearchHelper
  def form_search(path:, always_display: false, hideable: request.path.split("/")[2] != "search", method: :get, &)
    # dedicated search routes like /comments/search should always show
    search_params = params[:search] || {}
    show_on_load = filled_form_fields(search_params, &).any? || always_disp
    
  def form_search(path:, always_display: false, hideable: request.path.split("/")[2] != "search", method: :get, &)
    # dedicated search routes like /comments/search should always show
    search_params = params[:search] || {}
    show_on_load = filled_form_fields(search_params, &).any? || always_display || !hideable
    form = simple_form_for(:search, {
      method: method,
      url: path,
      builder: SearchFormBuilder,
      search_params: search_params,
      defaults: { required: false },
      html: { class: "inline-form" },
    }) do |f|
      id_input = f.input(:id, label: "ID", hide_unless_value: true)
      created_at_input = f.input(:created_at, hide_unless_value: true)
      updated_at_input = f.input(:updated_at, hide_unless_value: true)
      id_input + created_at_input + updated_at_input + capture { yield(f) } + f.submit("Search")
    end
    render "application/form_search", hideable: hideable, show_on_load: show_on_load, form: form
  end