diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-11-06 20:33:46 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-11-06 20:34:04 -0800 |
commit | 656d412546cd97d5660c634c2a41c799d3f9e211 (patch) | |
tree | cbbbd1f3da52486d0852425ce6e17ed9b3b08fe5 /railties/lib/rails/generators | |
parent | 9348fb6b1746aa0fed122e8f60b759025e242e2b (diff) | |
download | rails-656d412546cd97d5660c634c2a41c799d3f9e211.tar.gz rails-656d412546cd97d5660c634c2a41c799d3f9e211.tar.bz2 rails-656d412546cd97d5660c634c2a41c799d3f9e211.zip |
only ask for these ivars if the target responds to them
Diffstat (limited to 'railties/lib/rails/generators')
-rw-r--r-- | railties/lib/rails/generators/app_base.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index ecf3551f50..40145a7a50 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -144,9 +144,9 @@ module Rails def initialize(target) @target = target # unfortunately, instance eval has access to these ivars - @app_const = target.send :app_const - @app_const_base = target.send :app_const_base - @app_name = target.send :app_name + @app_const = target.send :app_const if target.respond_to?(:app_const, true) + @app_const_base = target.send :app_const_base if target.respond_to?(:app_const_base, true) + @app_name = target.send :app_name if target.respond_to?(:app_name, true) @commands = [] @gems = [] end |