diff options
Diffstat (limited to 'railties/lib/generators/rails/controller/controller_generator.rb')
-rw-r--r-- | railties/lib/generators/rails/controller/controller_generator.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/railties/lib/generators/rails/controller/controller_generator.rb b/railties/lib/generators/rails/controller/controller_generator.rb new file mode 100644 index 0000000000..91470be833 --- /dev/null +++ b/railties/lib/generators/rails/controller/controller_generator.rb @@ -0,0 +1,14 @@ +module Rails + module Generators + class ControllerGenerator < NamedBase + argument :actions, :type => :array, :default => [], :banner => "action action" + check_class_collision :suffix => "Controller" + + def create_controller_files + template 'controller.rb', File.join('app/controllers', class_path, "#{file_name}_controller.rb") + end + + hook_for :template_engine, :test_framework, :helper + end + end +end |