Class: Zadok::Filters::Ransack::TypeableMultiselect

Inherits:
Base
  • Object
show all
Defined in:
lib/zadok/filters/ransack/typeable_multiselect_filter.rb

Instance Attribute Summary

Attributes inherited from Base

#params

Instance Method Summary collapse

Methods inherited from Base

#active_in?, #add_to_params, #i18n_name, #index, #initialize, #modify_columns, #options, #param, #remove_from_params, #text, #title

Constructor Details

This class inherits a constructor from Zadok::Filters::Ransack::Base

Instance Method Details

#describe(current_params) ⇒ Object



7
8
9
10
11
# File 'lib/zadok/filters/ransack/typeable_multiselect_filter.rb', line 7

def describe(current_params)
  options.map do |key, value|
    value if current_params[param].include?(key)
  end.compact.join("|")
end

#typeObject



13
14
15
# File 'lib/zadok/filters/ransack/typeable_multiselect_filter.rb', line 13

def type
  :typeable_multiselect
end