Permalink
Browse files

Created a simple WidgetsController with show and edit pages

  • Loading branch information...
1 parent 4475940 commit dfa975430f9515cf887ff69729bc28eb477aeca1 Sam Pierson committed Feb 6, 2010
@@ -0,0 +1,2 @@
+class WidgetsController < ApplicationController
+end
@@ -0,0 +1,3 @@
+This is edit.html.erb.
+<br/>
+Your test appears to be working correctly.
@@ -0,0 +1,2 @@
+This is widget/show.html.erb.<br/>
+<%= link_to "Go to edit page", edit_widget_path %>
View
@@ -1,6 +1,8 @@
ActionController::Routing::Routes.draw do |map|
# The priority is based upon order of creation: first created -> highest priority.
+ map.resource :widget
+
# Sample of regular route:
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
# Keep in mind you can assign values other than :controller and :action
@@ -17,7 +19,7 @@
# Sample resource route with sub-resources:
# map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
-
+
# Sample resource route with more complex sub-resources
# map.resources :products do |products|
# products.resources :comments

0 comments on commit dfa9754

Please sign in to comment.