Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #10362: resource_docs_no_plural_option.2-0-stable.diff

File resource_docs_no_plural_option.2-0-stable.diff, 1.7 kB (added by kampers, 8 months ago)
  • actionpack/lib/action_controller/resources.rb

    old new  
    323323    #     project.resource :project_manager 
    324324    #   end 
    325325    # 
    326     # See map.resources for general conventions.  These are the main differences: 
    327     # * A singular name is given to map.resource.  The default controller name is still taken from the plural name. 
    328     # * To specify a custom plural name, use the :plural option.  There is no :singular option. 
    329     # * No default index route is created for the singleton resource controller. 
    330     # * When nesting singleton resources, only the singular name is used as the path prefix (example: 'account/messages/1') 
     326    # See <tt>#resources</tt> for general conventions.  These are the main differences: 
     327    # * A singular name is passed to <tt>resource</tt>. The controller's name is 
     328    #   inferred by pluralizing this name. To use a different controller, use the 
     329    #   <tt>:controller</tt> option. 
     330    # * No +index+ route is created. 
     331    # * When resources are nested, and a singleton resource forms part of a 
     332    #   path prefix, the singular name is used (example: <tt>/account/messages/1</tt>). 
    331333    # 
    332334    # For example: 
    333335    # 
     
    367369    #     end 
    368370    #   end 
    369371    # 
    370     # Along with the routes themselves, #resource generates named routes for 
     372    # Along with the routes themselves, <tt>#resource</tt> generates named routes for 
    371373    # use in controllers and views. <tt>map.resource :account</tt> produces 
    372374    # these named routes and helpers: 
    373375    #