diff options
author | Akira Matsuda <ronnie@dio.jp> | 2011-05-13 04:05:44 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2011-05-13 04:05:44 +0900 |
commit | 00379ee998b5ed10d8a4197f3fa0f57873f17ba1 (patch) | |
tree | 572e2082c48837950e2bf9c3d8f4a2df4a89dd30 /railties | |
parent | 2cf191bc768ea5f6b88ca4475a4ddd36dd91f016 (diff) | |
download | rails-00379ee998b5ed10d8a4197f3fa0f57873f17ba1.tar.gz rails-00379ee998b5ed10d8a4197f3fa0f57873f17ba1.tar.bz2 rails-00379ee998b5ed10d8a4197f3fa0f57873f17ba1.zip |
Revert "Delegate everything to the generator"
This reverts commit 0904e8256864239f673bf91fce1cfffb9345ee61.
reason: rake rails:update:scripts fails due to this change
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/rails/app/app_generator.rb | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index d79f76c799..ed3bf15ca9 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -9,11 +9,21 @@ module Rails @options = generator.options end - private + private + %w(template copy_file directory empty_directory inside + empty_directory_with_gitkeep create_file chmod shebang).each do |method| + class_eval <<-RUBY, __FILE__, __LINE__ + 1 + def #{method}(*args, &block) + @generator.send(:#{method}, *args, &block) + end + RUBY + end - def method_missing(meth, *args, &block) - @generator.send(meth, *args, &block) - end + # TODO: Remove once this is fully in place + def method_missing(meth, *args, &block) + STDERR.puts "Calling #{meth} with #{args.inspect} with #{block}" + @generator.send(meth, *args, &block) + end end # The application builder allows you to override elements of the application |