Module: Resourcey::ControllerFiltering

Included in:
Controller
Defined in:
lib/resourcey/controller_filtering.rb

Instance Method Summary collapse

Instance Method Details

#filtered_resourcesObject



3
4
5
6
7
8
# File 'lib/resourcey/controller_filtering.rb', line 3

def filtered_resources
  return resources if filter_class.nil?

  filter_instance = filter_class.new(params)
  filter_instance.apply(resources)
end