class Rails::Generators::NamedBase
def self.check_class_collision(options = {}) # :doc:
the presence of "AdminDecorator".
If the generator is invoked with class name Admin, it will check for
check_class_collision suffix: "Decorator"
==== Examples
can supply a hash with a +:prefix+ or +:suffix+ to be tested.
Add a class collisions name to be checked on class initialization. You
def self.check_class_collision(options = {}) # :doc: define_method :check_class_collision do name = if respond_to?(:controller_class_name, true) # for ResourceHelpers controller_class_name else class_name end class_collisions "#{options[:prefix]}#{name}#{options[:suffix]}" end end