mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
14 lines
439 B
Ruby
14 lines
439 B
Ruby
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
|