class method self.lookup_missing_generator

Ruby on Rails 2.3.18

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

self.lookup_missing_generator(class_id)

Lookup missing generators using const_missing. This allows any generator to reference another without having to know its location: RubyGems, ~/.rails/generators, and RAILS_ROOT/generators.

Parameters

class_id req
Source
# File railties/lib/rails_generator/lookup.rb, line 10
    def lookup_missing_generator(class_id)
      if md = /(.+)Generator$/.match(class_id.to_s)
        name = md.captures.first.demodulize.underscore
        Rails::Generator::Base.lookup(name).klass
      else
        const_missing_before_generators(class_id)
      end
    end

Defined in railties/lib/rails_generator/lookup.rb line 10 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Object

Type at least 2 characters to search.

↑↓ navigate · open · esc close