Closed
Description
The following code
class << self
def normalize_path(scope, path)
path_desc = new(scope)
path_desc.increment(path.shift) while path_desc.next? && path.present?
path_desc if path.empty?
end
end
raises JsonapiExt::Scoping::Include::PathDescriptor#normalize_path refers to 'path' more than self (maybe move it to another class?)
however, if I rewrite it to:
def self.normalize_path(scope, path)
path_desc = new(scope)
path_desc.increment(path.shift) while path_desc.next? && path.present?
path_desc if path.empty?
end
it does not.