Checking available Rails generators programatically
In a recent debug session, I needed to know which generators were available at a certain point in time.
There's an undocumented way to see them, up to Rails 4.1.7 (I don't know starting from which version) there's Rails::Generators.help
(don't forget to require 'rails/generators'
!).
In what's today the master branch, there's a new Rails::Generators.print_generators
that prints all generators, so that'll probably be available in upcoming Rails versions.
Written by Julio Olivera
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Related Tags
#rails
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#