From e9a9ef094e84abfe6a0167e9255abcf5b63412d9 Mon Sep 17 00:00:00 2001 From: Ravinder Singh Date: Fri, 16 Apr 2010 16:58:14 +0530 Subject: warn user if options are given before application name [#3435 state:resolved] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- railties/lib/rails/generators/rails/app/app_generator.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'railties/lib/rails') diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index aa066fe3c4..667a123025 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -55,6 +55,7 @@ module Rails::Generators :desc => "Show this help message and quit" def initialize(*args) + raise Error, "Options should be given after the application name. For details run: rails --help" if args[0].blank? super if !options[:skip_activerecord] && !DATABASES.include?(options[:database]) raise Error, "Invalid value for --database option. Supported for preconfiguration are: #{DATABASES.join(", ")}." -- cgit v1.2.3