Sha256: 8546a1738f12cf1d031d003d3df01452ff9267ae29b5456d5d0c4f9a971ddd3f
Contents?: true
Size: 570 Bytes
Versions: 8
Compression:
Stored size: 570 Bytes
Contents
module Admin module SearchHelper def search(resource = @resource) typus_search = resource.typus_defaults_for(:search) return if typus_search.empty? search_by = typus_search.collect { |x| resource.human_attribute_name(x) }.to_sentence search_params = params.dup %w(action controller id search page).each { |p| search_params.delete(p) } hidden_params = search_params.map { |k, v| hidden_field_tag(k, v) } render "admin/helpers/search/search", :hidden_params => hidden_params, :search_by => search_by end end end
Version data entries
8 entries across 8 versions & 1 rubygems