Ensure that app generator is not loaded twice to get rid of warnings

Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
Piotr Sarnacki 2010-11-21 02:47:20 +01:00 committed by José Valim
parent f821055dc7
commit 115abd52b6
1 changed files with 1 additions and 0 deletions

View File

@ -302,6 +302,7 @@ module Rails
$LOAD_PATH.each do |base|
Dir[File.join(base, "{rails/generators,generators}", "**", "*_generator.rb")].each do |path|
begin
path = path.sub("#{base}/", "")
require path
rescue Exception => e
# No problem