continue klass exit continue option exit !!! continue exit params.fetch(:order, {}).find_all { |(k, _)| self.class::ORDER_ATTRIBUTES.include? k }.to_h params.fetch(:order, {}).find_all { |(k, _)| self.class::ORDER_ATTRIBUTES.include? k }.flatten params.fetch(:order, {}).find_all { |(k, _)| self.class::ORDER_ATTRIBUTES.include? k } params.fetch(:order) ) params.fetch(:order exit option && direction && self.class::ORDER_ATTRIBUTES.include?(option) && %w[asc desc].include?(direction.to_s.downcase) option && direction && self.class::ORDER_ATTRIBUTES.include?(option) option && direction direction option exit !!! continue %w[asc desc].include?(direction.to_s.downcase) %w[asc desc].include?(direction.downcase) self.class::ORDER_ATTRIBUTES.include?(option) valid_sort?(option, direction) order_params continue order_params direction option continue f continue self.class.entity_class.where self.class.entity_class self.class self continue @collection continue @collection collection continue @collection continue @collection continue value continue value