GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Fork of lifo/doc-rails
Description: Repository for improving Rails documentation
Homepage: http://www.rubyonrails.org
Clone URL: git://github.com/zmalltalker/doc-rails.git
fixed-width font for symbols in AC::Resources docs
Xavier Noria (author)
Thu Apr 10 07:42:50 -0700 2008
commit  c4f410acb888493c469b41935f521af27b5fff6c
tree    ca62634b354b045c5340dc321cedfef958358aad
parent  037e76b27e629290e46210d5a67cc6bdcf2b56ae
...
238
239
240
241
242
 
 
243
244
245
246
 
247
248
249
...
252
253
254
255
 
256
257
258
...
279
280
281
282
 
283
284
285
...
293
294
295
296
 
297
298
299
...
355
356
357
358
 
359
360
361
...
238
239
240
 
 
241
242
243
244
245
 
246
247
248
249
...
252
253
254
 
255
256
257
258
...
279
280
281
 
282
283
284
285
...
293
294
295
 
296
297
298
299
...
355
356
357
 
358
359
360
361
0
@@ -238,12 +238,12 @@ module ActionController
0
     # * <tt>:collection</tt> - add named routes for other actions that operate on the collection.
0
     # Takes a hash of <tt>#{action} => #{method}</tt>, where method is <tt>:get</tt>/<tt>:post</tt>/<tt>:put</tt>/<tt>:delete</tt>
0
     # or <tt>:any</tt> if the method does not matter. These routes map to a URL like /messages/rss, with a route of rss_messages_url.
0
- # * <tt>:member</tt> - same as :collection, but for actions that operate on a specific member.
0
- # * <tt>:new</tt> - same as :collection, but for actions that operate on the new resource action.
0
+ # * <tt>:member</tt> - same as <tt>:collection</tt>, but for actions that operate on a specific member.
0
+ # * <tt>:new</tt> - same as <tt>:collection</tt>, but for actions that operate on the new resource action.
0
     # * <tt>:controller</tt> - specify the controller name for the routes.
0
     # * <tt>:singular</tt> - specify the singular name used in the member routes.
0
     # * <tt>:requirements</tt> - set custom routing parameter requirements.
0
- # * <tt>:conditions</tt> - specify custom routing recognition conditions. Resources sets the :method value for the method-specific routes.
0
+ # * <tt>:conditions</tt> - specify custom routing recognition conditions. Resources sets the <tt>:method</tt> value for the method-specific routes.
0
     # * <tt>:as</tt> - specify a different resource name to use in the URL path. For example:
0
     # # products_path == '/productos'
0
     # map.resources :products, :as => 'productos' do |product|
0
@@ -252,7 +252,7 @@ module ActionController
0
     # end
0
     #
0
     # * <tt>:has_one</tt> - specify nested resources, this is a shorthand for mapping singleton resources beneath the current.
0
- # * <tt>:has_many</tt> - same has :has_one, but for plural resources.
0
+ # * <tt>:has_many</tt> - same has <tt>:has_one</tt>, but for plural resources.
0
     #
0
     # You may directly specify the routing association with has_one and has_many like:
0
     #
0
@@ -279,7 +279,7 @@ module ActionController
0
     # article.resources :comments
0
     # end
0
     #
0
- # The comment resources work the same, but must now include a value for :article_id.
0
+ # The comment resources work the same, but must now include a value for <tt>:article_id</tt>.
0
     #
0
     # article_comments_url(@article)
0
     # article_comment_url(@article, @comment)
0
@@ -293,7 +293,7 @@ module ActionController
0
     # map.resources :tags, :path_prefix => '/books/:book_id', :name_prefix => 'book_'
0
     # map.resources :tags, :path_prefix => '/toys/:toy_id', :name_prefix => 'toy_'
0
     #
0
- # You may also use :name_prefix to override the generic named routes in a nested resource:
0
+ # You may also use <tt>:name_prefix</tt> to override the generic named routes in a nested resource:
0
     #
0
     # map.resources :articles do |article|
0
     # article.resources :comments, :name_prefix => nil
0
@@ -355,7 +355,7 @@ module ActionController
0
     #
0
     # See map.resources for general conventions. These are the main differences:
0
     # * A singular name is given to map.resource. The default controller name is still taken from the plural name.
0
- # * To specify a custom plural name, use the :plural option. There is no :singular option.
0
+ # * To specify a custom plural name, use the <tt>:plural</tt> option. There is no <tt>:singular</tt> option.
0
     # * No default index route is created for the singleton resource controller.
0
     # * When nesting singleton resources, only the singular name is used as the path prefix (example: 'account/messages/1')
0
     #

Comments

    No one has commented yet.