Module: ActionSet::InstanceMethods

Defined in:
lib/action_set.rb

Instance Method Summary collapse

Instance Method Details

#process_set(set) ⇒ Object



31
32
33
34
35
36
37
38
39
# File 'lib/action_set.rb', line 31

def process_set(set)
  @set = set
  @filters = JSON.parse(filter_params.to_json,
                        object_class: Filter)
  active_set = ActiveSet.new(set)
  active_set = active_set.filter(filter_structure) if filter_params.any?
  active_set = active_set.sort(sort_params) if sort_params.any?
  active_set
end