Sha256: 490511cf6ab41f8a9f332bd2507097dbd3e39fe39f445c1637bee835eb53daa6

Contents?: true

Size: 637 Bytes

Versions: 13

Compression:

Stored size: 637 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Admin
    # Overrides some methods from Ransack::Helpers::FormHelper to fix the search
    # user interfaces within Decidim.
    module SearchFormHelper
      # Provide the correct builder option for the admin search forms. Otherwise
      # they would be generated using Ransack::Helpers::FormHelper which does
      # not provide all the same features that the Decidim form builders, such
      # as datetime pickers.
      def search_form_for(record, options = {}, &)
        options[:builder] ||= SearchFormBuilder

        super(record, options, &)
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
decidim-admin-0.29.1 app/helpers/decidim/admin/search_form_helper.rb
decidim-admin-0.28.4 app/helpers/decidim/admin/search_form_helper.rb
decidim-admin-0.29.0 app/helpers/decidim/admin/search_form_helper.rb
decidim-admin-0.28.3 app/helpers/decidim/admin/search_form_helper.rb
decidim-admin-0.29.0.rc4 app/helpers/decidim/admin/search_form_helper.rb
decidim-admin-0.29.0.rc3 app/helpers/decidim/admin/search_form_helper.rb
decidim-admin-0.29.0.rc2 app/helpers/decidim/admin/search_form_helper.rb
decidim-admin-0.29.0.rc1 app/helpers/decidim/admin/search_form_helper.rb
decidim-admin-0.28.2 app/helpers/decidim/admin/search_form_helper.rb
decidim-admin-0.28.1 app/helpers/decidim/admin/search_form_helper.rb
decidim-admin-0.28.0 app/helpers/decidim/admin/search_form_helper.rb
decidim-admin-0.28.0.rc5 app/helpers/decidim/admin/search_form_helper.rb
decidim-admin-0.28.0.rc4 app/helpers/decidim/admin/search_form_helper.rb