aboutsummaryrefslogtreecommitdiffstats
path: root/railties/doc/guides/source/creating_plugins/controllers.txt
diff options
context:
space:
mode:
Diffstat (limited to 'railties/doc/guides/source/creating_plugins/controllers.txt')
-rw-r--r--railties/doc/guides/source/creating_plugins/controllers.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/railties/doc/guides/source/creating_plugins/controllers.txt b/railties/doc/guides/source/creating_plugins/controllers.txt
index ee408adb1d..7afdef032d 100644
--- a/railties/doc/guides/source/creating_plugins/controllers.txt
+++ b/railties/doc/guides/source/creating_plugins/controllers.txt
@@ -1,10 +1,10 @@
-== Add a controller ==
+== Controllers ==
This section describes how to add a controller named 'woodpeckers' to your plugin that will behave the same as a controller in your main app. This is very similar to adding a model.
You can test your plugin's controller as you would test any other controller:
-*vendor/plugins/yaffle/yaffle/woodpeckers_controller_test.rb:*
+*vendor/plugins/yaffle/test/woodpeckers_controller_test.rb:*
[source, ruby]
----------------------------------------------
@@ -19,6 +19,10 @@ class WoodpeckersControllerTest < Test::Unit::TestCase
@controller = WoodpeckersController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
+
+ ActionController::Routing::Routes.draw do |map|
+ map.resources :woodpeckers
+ end
end
def test_index