diff options
-rw-r--r-- | railties/lib/generators.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/railties/lib/generators.rb b/railties/lib/generators.rb index 8814f6e800..c97801dea8 100644 --- a/railties/lib/generators.rb +++ b/railties/lib/generators.rb @@ -15,12 +15,20 @@ require 'generators/named_base' module Rails module Generators + # Remove builtin generators. + # def self.builtin Dir[File.dirname(__FILE__) + '/generators/*/*'].collect do |file| file.split('/')[-2, 2] end end + # Remove the color from output. + # + def self.no_color! + Thor::Base.shell = Thor::Shell::Basic + end + # Receives a namespace and tries different combinations to find a generator. # # ==== Examples |