Module: HalApi::Controller::Filtering::ClassMethods
- Defined in:
- lib/hal_api/controller/filtering.rb
Instance Method Summary collapse
Instance Method Details
#filter_params(*args) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/hal_api/controller/filtering.rb', line 30 def filter_params(*args) self.allowed_filter_names = [] self.allowed_filter_types = {} (args || []).map do |arg| if arg.is_a? Hash arg.to_a.each { |key, val| add_filter_param(key.to_s, val.to_s) } else add_filter_param(arg.to_s) end end end |