module Rails::Generators
def self.namespaces_to_paths(namespaces) #:nodoc:
in both: "rails/model/model_generator" and "rails/model_generator".
an extra lookup. For example, "rails:model" should be searched
Convert namespaces to paths by replacing ":" for "/" and adding
def self.namespaces_to_paths(namespaces) #:nodoc: paths = [] namespaces.each do |namespace| pieces = namespace.split(":") paths << pieces.dup.push(pieces.last).join("/") paths << pieces.join("/") end paths.uniq! paths end