aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/generators/rails/controller
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-03-23 13:40:19 +0100
committerJosé Valim <jose.valim@gmail.com>2010-03-23 13:40:41 +0100
commitb61f6f59805eec4f5bb873a85910c9fe00e839a9 (patch)
tree485dc3cee827ab4d79756e90d639ccc4dad464e1 /railties/lib/generators/rails/controller
parentb144b56d8288246f0de7437d10361a0f1ed2bd83 (diff)
downloadrails-b61f6f59805eec4f5bb873a85910c9fe00e839a9.tar.gz
rails-b61f6f59805eec4f5bb873a85910c9fe00e839a9.tar.bz2
rails-b61f6f59805eec4f5bb873a85910c9fe00e839a9.zip
Load generators from both lib/rails/generators and lib/generators. Using the former since it's less obstrusive.
Diffstat (limited to 'railties/lib/generators/rails/controller')
-rw-r--r--railties/lib/generators/rails/controller/USAGE18
-rw-r--r--railties/lib/generators/rails/controller/controller_generator.rb20
-rw-r--r--railties/lib/generators/rails/controller/templates/controller.rb7
3 files changed, 0 insertions, 45 deletions
diff --git a/railties/lib/generators/rails/controller/USAGE b/railties/lib/generators/rails/controller/USAGE
deleted file mode 100644
index 70618a3906..0000000000
--- a/railties/lib/generators/rails/controller/USAGE
+++ /dev/null
@@ -1,18 +0,0 @@
-Description:
- Stubs out a new controller and its views. Pass the controller name, either
- CamelCased or under_scored, and a list of views as arguments.
-
- To create a controller within a module, specify the controller name as a
- path like 'parent_module/controller_name'.
-
- This generates a controller class in app/controllers and invokes helper,
- template engine and test framework generators.
-
-Example:
- `rails generate controller CreditCard open debit credit close`
-
- Credit card controller with URLs like /credit_card/debit.
- Controller: app/controllers/credit_card_controller.rb
- Functional Test: test/functional/credit_card_controller_test.rb
- Views: app/views/credit_card/debit.html.erb [...]
- Helper: app/helpers/credit_card_helper.rb
diff --git a/railties/lib/generators/rails/controller/controller_generator.rb b/railties/lib/generators/rails/controller/controller_generator.rb
deleted file mode 100644
index 9788c0d0bc..0000000000
--- a/railties/lib/generators/rails/controller/controller_generator.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-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
-
- def add_routes
- actions.reverse.each do |action|
- route %{get "#{file_name}/#{action}"}
- end
- end
-
- hook_for :template_engine, :test_framework, :helper
- end
- end
-end
diff --git a/railties/lib/generators/rails/controller/templates/controller.rb b/railties/lib/generators/rails/controller/templates/controller.rb
deleted file mode 100644
index cda2659e69..0000000000
--- a/railties/lib/generators/rails/controller/templates/controller.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-class <%= class_name %>Controller < ApplicationController
-<% for action in actions -%>
- def <%= action %>
- end
-
-<% end -%>
-end