Permalink
Browse files

Handle edge cases in the previous patch.

  • Loading branch information...
1 parent cdad483 commit 558ee6e95ccd6c2098595f2edfa59e8aa9108167 @josevalim josevalim committed Aug 2, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 railties/lib/rails/generators/rails/app/app_generator.rb
@@ -357,7 +357,8 @@ def app_name
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

0 comments on commit 558ee6e

Please sign in to comment.