diff options
author | José Valim <jose.valim@gmail.com> | 2010-08-02 16:40:02 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-08-02 16:40:02 +0200 |
commit | 558ee6e95ccd6c2098595f2edfa59e8aa9108167 (patch) | |
tree | 4598c9cdec52ff96d5e28afd2914c71048edebd8 | |
parent | cdad483dff4fef1b640dc3c750719c325b252f89 (diff) | |
download | rails-558ee6e95ccd6c2098595f2edfa59e8aa9108167.tar.gz rails-558ee6e95ccd6c2098595f2edfa59e8aa9108167.tar.bz2 rails-558ee6e95ccd6c2098595f2edfa59e8aa9108167.zip |
Handle edge cases in the previous patch.
-rw-r--r-- | railties/lib/rails/generators/rails/app/app_generator.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index dd18588b39..a90f109844 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -357,7 +357,8 @@ module Rails end def defined_app_const_base - Rails.application.class.name.sub(/::Application$/, "") if Rails.application.instance_of?(Rails::Application) + Rails.respond_to?(:application) && defined?(Rails::Application) && + Rails.application.is_a?(Rails::Application) && Rails.application.class.name.sub(/::Application$/, "") end def app_const_base |