--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Behavior#<tt>resource</tt> is a route helper for defining a singular RESTful resource. It yields to a block for child routes.
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Parameters
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "name<String, Symbol>:"
    body: The name of the resource.
  - !ruby/struct:SM::Flow::LI 
    label: "options<Hash>:"
    body: Overides and parameters to be associated with the route.
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Options (options)
- !ruby/struct:SM::Flow::P 
  body: ":namespace&lt;~to_s&gt;: The namespace for this route. :name_prefix&lt;~to_s&gt;:"
- !ruby/struct:SM::Flow::VERB 
  body: "  A prefix for the named routes. If a namespace is passed and there\n  isn't a name prefix, the namespace will become the prefix.\n"
- !ruby/struct:SM::Flow::P 
  body: ":controller&lt;~to_s&gt;: The controller for this route"
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Block parameters
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "next_level<Behavior>:"
    body: The child behavior.
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Returns
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "Array:"
    body: Routes which define a RESTful single resource.
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Examples
- !ruby/struct:SM::Flow::VERB 
  body: " r.resource :account # will result in the typical RESTful CRUD\n   # shows new resource form\n   # GET     /account/new                :action =&gt; &quot;new&quot;\n\n   # creates resource\n   # POST    /account/?(\\.:format)?,     :action =&gt; &quot;create&quot;\n\n   # shows resource\n   # GET     /account/(\\.:format)?       :action =&gt; &quot;show&quot;\n\n   # shows edit form\n   # GET     /account//edit           :action =&gt; &quot;edit&quot;\n\n   # updates resource\n   # PUT     /account/(\\.:format)?       :action =&gt; &quot;update&quot;\n\n   # shows deletion confirmation page\n   # GET     /account//delete         :action =&gt; &quot;delete&quot;\n\n   # destroys resources\n   # DELETE  /account/(\\.:format)?       :action =&gt; &quot;destroy&quot;\n"
- !ruby/struct:SM::Flow::P 
  body: You can optionally pass :namespace and :controller to refine the routing or pass a block to nest resources.
- !ruby/struct:SM::Flow::VERB 
  body: "  r.resource :account, :namespace =&gt; &quot;admin&quot; do |account|\n    account.resources :preferences, :controller =&gt; &quot;settings&quot;\n  end\n"
- !ruby/struct:SM::Flow::P 
  body: ":api: public"
full_name: Merb::Router::Resources#resource
is_singleton: false
name: resource
params: (name, *args, &block)
visibility: public
