mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
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:
committed by
José Valim
parent
f821055dc7
commit
115abd52b6
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user