<?xml version="1.0" encoding="UTF-8"?>
<ticket>
  <assigned-user-id type="integer">7211</assigned-user-id>
  <attachments-count type="integer">0</attachments-count>
  <closed type="boolean">true</closed>
  <created-at type="datetime">2008-09-04T14:43:31+01:00</created-at>
  <creator-id type="integer">1366</creator-id>
  <milestone-due-on type="datetime" nil="true"></milestone-due-on>
  <milestone-id type="integer" nil="true"></milestone-id>
  <number type="integer">3</number>
  <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
  <priority type="integer">19700</priority>
  <project-id type="integer">16213</project-id>
  <raw-data type="binary" nil="true" encoding="base64"></raw-data>
  <state>published</state>
  <tag nil="true"></tag>
  <title>Routing from the outside in. Cover the user-facing features of routing.</title>
  <updated-at type="datetime">2010-01-24T16:58:18+00:00</updated-at>
  <user-id type="integer">83786</user-id>
  <user-name>psi</user-name>
  <creator-name>Pratik</creator-name>
  <assigned-user-name>Mike Gunderloy</assigned-user-name>
  <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
  <original-body>Routing from the outside in. Cover the user-facing features of routing.</original-body>
  <latest-body>Routing from the outside in. Cover the user-facing features of routing.</latest-body>
  <original-body-html>&lt;div&gt;&lt;p&gt;Routing from the outside in. Cover the user-facing features of
routing.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  <versions type="array">
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Routing from the outside in. Cover the user-facing features of routing.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Routing from the outside in. Cover the user-facing features of
routing.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-04T14:43:32+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag>routing</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-04T14:43:32+01:00</updated-at>
      <user-id type="integer">1366</user-id>
      <user-name>Pratik</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I've committed a version of this to docrails, ready for review. I know of a couple of typos that need to be fixed (drat, proofing twice wasn't enough) but I'd be happy for any more substantive feedback.

guides/routing/routing_outside_in.txt</body>
      <body-html>&lt;div&gt;&lt;p&gt;I've committed a version of this to docrails, ready for review.
I know of a couple of typos that need to be fixed (drat, proofing
twice wasn't enough) but I'd be happy for any more substantive
feedback.&lt;/p&gt;
&lt;p&gt;guides/routing/routing_outside_in.txt&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-04T16:39:10+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing-2</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag>routing</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-04T16:39:10+01:00</updated-at>
      <user-id type="integer">7211</user-id>
      <user-name>Mike Gunderloy</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Mike,

I'd remove the analogy here (or change it to something else):

@@@
Rails routing is a two-way piece of machinery - rather as if you
could turn pigs into sausage, and then turn sausage back into pigs.
@@@

It could be inappropriate for some audiences.

Also in this chapter:

@@@
link_to &quot;Patient Record&quot;, patient_path(@patient)
@@@

It should be noted that patient has to be declared a resource for the named route to be available.

In Chapters 2 and 4, you are labeling regular routes as being &quot;old-style&quot;. This will discourage people from using them, thinking they are deprecated or obsolete in some way. Regular routes still (and always will) have their usages; it's just that RESTful routes should be preferred *when possible*.

In Chapter 3, you're saying that RESTful routes are &quot;the new standard&quot; in Rails. Because the target audience for these guides are newcomers that will get started with Rails 2.1 anyway, I don't think it matters to them that this is something &quot;new&quot;. I think you should just point out that they are encouraged and preferred.

I'd also rename &quot;Dumping Routes with rake&quot; to something like &quot;How to inspecting existing routes&quot;</body>
      <body-html>&lt;div&gt;&lt;p&gt;Mike,&lt;/p&gt;
&lt;p&gt;I'd remove the analogy here (or change it to something
else):&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
Rails routing is a two-way piece of machinery - rather as if you
could turn pigs into sausage, and then turn sausage back into pigs.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It could be inappropriate for some audiences.&lt;/p&gt;
&lt;p&gt;Also in this chapter:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
link_to &amp;quot;Patient Record&amp;quot;, patient_path(@patient)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It should be noted that patient has to be declared a resource
for the named route to be available.&lt;/p&gt;
&lt;p&gt;In Chapters 2 and 4, you are labeling regular routes as being
&quot;old-style&quot;. This will discourage people from using them, thinking
they are deprecated or obsolete in some way. Regular routes still
(and always will) have their usages; it's just that RESTful routes
should be preferred &lt;em&gt;when possible&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;In Chapter 3, you're saying that RESTful routes are &quot;the new
standard&quot; in Rails. Because the target audience for these guides
are newcomers that will get started with Rails 2.1 anyway, I don't
think it matters to them that this is something &quot;new&quot;. I think you
should just point out that they are encouraged and preferred.&lt;/p&gt;
&lt;p&gt;I'd also rename &quot;Dumping Routes with rake&quot; to something like
&quot;How to inspecting existing routes&quot;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-04T17:17:04+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing-3</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag>routing</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-04T17:17:04+01:00</updated-at>
      <user-id type="integer">192</user-id>
      <user-name>Mislav</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Hey Mike,

It's pretty awesome. Mislav has valid points too.

Also, the guide should mention 2-3 lines about testing routes and link http://api.rubyonrails.com/classes/ActionController/Assertions/RoutingAssertions.html

Thanks!</body>
      <body-html>&lt;div&gt;&lt;p&gt;Hey Mike,&lt;/p&gt;
&lt;p&gt;It's pretty awesome. Mislav has valid points too.&lt;/p&gt;
&lt;p&gt;Also, the guide should mention 2-3 lines about testing routes
and link &lt;a href=&quot;http://api.rubyonrails.com/classes/ActionController/Assertions/RoutingAssertions.html&quot;&gt;
http://api.rubyonrails.com/class...&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-05T03:55:27+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing-4</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag>routing</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-05T03:55:27+01:00</updated-at>
      <user-id type="integer">1366</user-id>
      <user-name>Pratik</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Also, we should advice users not to nest more than 1 level as a rule of thumb. http://weblog.jamisbuck.org/2007/2/5/nesting-resources</body>
      <body-html>&lt;div&gt;&lt;p&gt;Also, we should advice users not to nest more than 1 level as a
rule of thumb. &lt;a href=&quot;http://weblog.jamisbuck.org/2007/2/5/nesting-resources&quot;&gt;http://weblog.jamisbuck.org/2007...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-05T14:31:21+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag>routing</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-05T14:31:24+01:00</updated-at>
      <user-id type="integer">1366</user-id>
      <user-name>Pratik</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Thanks for the feedback, guys. I made some edits to respond. I think this one is pretty close to final, unless someone else spots an area to improve.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Thanks for the feedback, guys. I made some edits to respond. I
think this one is pretty close to final, unless someone else spots
an area to improve.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-05T14:46:14+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag>routing</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-05T14:46:16+01:00</updated-at>
      <user-id type="integer">7211</user-id>
      <user-name>Mike Gunderloy</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Pratik, there's already some guidance to avoid deeply-nested routes - see the section &quot;Limits to Nesting&quot;. I'm a bit hesitant to link back to Jamis' article from here, since it predates the addition of :shallow to the routing code. But I could add a stronger warning if you think it's warranted.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Pratik, there's already some guidance to avoid deeply-nested
routes - see the section &quot;Limits to Nesting&quot;. I'm a bit hesitant to
link back to Jamis' article from here, since it predates the
addition of :shallow to the routing code. But I could add a
stronger warning if you think it's warranted.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-05T14:48:44+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag>routing</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-05T14:48:48+01:00</updated-at>
      <user-id type="integer">7211</user-id>
      <user-name>Mike Gunderloy</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I think the :shallow option needs to be explained better. It took me a while to see what the :shallow option is doing, but after I understood what the option does, I wondered: &quot;what's the point? how is this any different from not nesting the resources in the first place?&quot;
Only after reading Ryan's blog today (http://feeds.feedburner.com/~r/RyansScraps/~3/386049038/what-s-new-in-edge-rails-shallow-routes) did I understand its purpose: &quot;No longer do you need to separately declare direct routes in addition to nested routes, the :shallow option automatically make all necessary routes.&quot;

I think that an explanation similar to Ryan's is better.</body>
      <body-html>&lt;div&gt;&lt;p&gt;I think the :shallow option needs to be explained better. It
took me a while to see what the :shallow option is doing, but after
I understood what the option does, I wondered: &quot;what's the point?
how is this any different from not nesting the resources in the
first place?&quot; Only after reading Ryan's blog today (&lt;a href=&quot;http://feeds.feedburner.com/~r/RyansScraps/~3/386049038/what-s-new-in-edge-rails-shallow-routes)&quot;&gt;http://feeds.feedburner.com/~r/R...&lt;/a&gt;
did I understand its purpose: &quot;No longer do you need to separately
declare direct routes in addition to nested routes, the :shallow
option automatically make all necessary routes.&quot;&lt;/p&gt;
&lt;p&gt;I think that an explanation similar to Ryan's is better.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-08T12:06:26+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag>routing</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-08T12:06:31+01:00</updated-at>
      <user-id type="integer">10679</user-id>
      <user-name>Hongli Lai</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I've reworked the section on nested and shallowed routes.</body>
      <body-html>&lt;div&gt;&lt;p&gt;I've reworked the section on nested and shallowed routes.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-08T13:13:25+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag>routing</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-08T13:13:31+01:00</updated-at>
      <user-id type="integer">7211</user-id>
      <user-name>Mike Gunderloy</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>This guide is pretty much done now. There are some typos &quot;/magazines/1/ad/1&quot; - it should be 'ads'.</body>
      <body-html>&lt;div&gt;&lt;p&gt;This guide is pretty much done now. There are some typos
&quot;/magazines/1/ad/1&quot; - it should be 'ads'.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-10T11:58:23+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag>routing</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-10T11:58:31+01:00</updated-at>
      <user-id type="integer">1366</user-id>
      <user-name>Pratik</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Yeah, it would help if we didn't show people the wrong URLs, wouldn't it? Thanks for catching that; I don't know where my brain was vacationing. Fixes committed.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Yeah, it would help if we didn't show people the wrong URLs,
wouldn't it? Thanks for catching that; I don't know where my brain
was vacationing. Fixes committed.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-10T12:55:58+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag>routing</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-10T12:56:03+01:00</updated-at>
      <user-id type="integer">7211</user-id>
      <user-name>Mike Gunderloy</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Koz caught that ;-)

Alright, we have our first guide that's &quot;done&quot; thanks to Mike.

@Mike, could you please drop me an email to pratiknaik aT gmail so that we can sort out prizes and stuff.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Koz caught that ;-)&lt;/p&gt;
&lt;p&gt;Alright, we have our first guide that's &quot;done&quot; thanks to
Mike.&lt;/p&gt;
&lt;p&gt;@Mike, could you please drop me an email to pratiknaik aT gmail
so that we can sort out prizes and stuff.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-09-10T13:01:15+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:state: new
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag>routing</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-10T13:01:21+01:00</updated-at>
      <user-id type="integer">1366</user-id>
      <user-name>Pratik</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Good job. :) Could you also add a description to the index page (index.txt)?

And some final comments:

&quot;These default routes are automatically generated when you create a new Rails application. If you're using RESTful routing, you will probably want to remove them.&quot;

I think you should say something along the lines of &quot;you will probably want to remove them, if you don't use them&quot;. The current sentence might make the reader think that having just 1 REST route will make the default routes obsolete, either because of magic or because a REST route automatically creates default routes, or something.


And:

  map.resources photos, ...

Shouldn't &quot;photos&quot; be a string here?</body>
      <body-html>&lt;div&gt;&lt;p&gt;Good job. :) Could you also add a description to the index page
(index.txt)?&lt;/p&gt;
&lt;p&gt;And some final comments:&lt;/p&gt;
&lt;p&gt;&quot;These default routes are automatically generated when you
create a new Rails application. If you're using RESTful routing,
you will probably want to remove them.&quot;&lt;/p&gt;
&lt;p&gt;I think you should say something along the lines of &quot;you will
probably want to remove them, if you don't use them&quot;. The current
sentence might make the reader think that having just 1 REST route
will make the default routes obsolete, either because of magic or
because a REST route automatically creates default routes, or
something.&lt;/p&gt;
&lt;p&gt;And:&lt;/p&gt;
&lt;p&gt;map.resources photos, ...&lt;/p&gt;
&lt;p&gt;Shouldn't &quot;photos&quot; be a string here?&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-09-12T12:03:20+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag>routing</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-12T12:03:31+01:00</updated-at>
      <user-id type="integer">10679</user-id>
      <user-name>Hongli Lai</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Thanks Hongli. I've done that big of cleanup.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Thanks Hongli. I've done that big of cleanup.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-09-13T13:00:30+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag>routing</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-13T13:00:55+01:00</updated-at>
      <user-id type="integer">7211</user-id>
      <user-name>Mike Gunderloy</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>OK. :) Just in case you didn't know, you can view your own work here: http://railsguides.phusion.nl/routing/routing_outside_in.html</body>
      <body-html>&lt;div&gt;&lt;p&gt;OK. :) Just in case you didn't know, you can view your own work
here: &lt;a href=&quot;http://railsguides.phusion.nl/routing/routing_outside_in.html&quot;&gt;http://railsguides.phusion.nl/ro...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-09-13T13:11:05+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag>routing</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-13T13:11:26+01:00</updated-at>
      <user-id type="integer">10679</user-id>
      <user-name>Hongli Lai</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>OK. :) Just in case you didn't know, you can view your own work here: http://railsguides.phusion.nl/routing/routing_outside_in.html</body>
      <body-html>&lt;div&gt;&lt;p&gt;OK. :) Just in case you didn't know, you can view your own work
here: &lt;a href=&quot;http://railsguides.phusion.nl/routing/routing_outside_in.html&quot;&gt;http://railsguides.phusion.nl/ro...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-09-13T13:15:09+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag>routing</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-13T13:15:33+01:00</updated-at>
      <user-id type="integer">10679</user-id>
      <user-name>Hongli Lai</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Excellent writeup. From my first glance it seems the 'map.namespace' is not mentioned - although that could have been intentional.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Excellent writeup. From my first glance it seems the
'map.namespace' is not mentioned - although that could have been
intentional.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-09-16T21:27:57+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: routing
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag>routing</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-16T21:27:59+01:00</updated-at>
      <user-id type="integer">32163</user-id>
      <user-name>ronin-32163 (at lighthouseapp)</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>OOps .. for some reason Lighthouse just updated the tag. Sorry.</body>
      <body-html>&lt;div&gt;&lt;p&gt;OOps .. for some reason Lighthouse just updated the tag.
Sorry.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-09-16T21:28:52+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: &quot;[routing]&quot;
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-16T21:28:58+01:00</updated-at>
      <user-id type="integer">32163</user-id>
      <user-name>ronin-32163 (at lighthouseapp)</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Mike, great guide. Found it really useful as I'm new to rails.

Just a couple of minor issues though:

1. Field &quot;used for&quot; in table in section 3.6 uses &quot;photo&quot; instead of &quot;ad&quot; in multiple places.
2. In section 4.2 there is &lt;code&gt;map.connect ':controller/:action/:id/:userid:&lt;/code&gt;. The &lt;code&gt;:userid:&lt;/code&gt; at the end should probably be &lt;code&gt;:user_id&lt;code&gt;.
3. In 4.9 a word &quot;engulf&quot; _could_ be replaced with some more common word that non-native English speakers, such as myself, would understand. Word &quot;capture&quot; comes to mind as a possible replacement. Though it is easy to understand what it means by reading a bit further.
4. In section 5.0 there is a &lt;code&gt;/photo/new/1.xml&lt;/code&gt; as an example. Don't know if this is intentional or not, but according to my limited knowledge of Rails this example doesn't really make a lot of sense as you're passing an id to &quot;new&quot; action. Even though it is technically correct, perhaps a better example can be used if its not intentional.

Thanks!</body>
      <body-html>&lt;div&gt;&lt;p&gt;Mike, great guide. Found it really useful as I'm new to
rails.&lt;/p&gt;
&lt;p&gt;Just a couple of minor issues though:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Field &quot;used for&quot; in table in section 3.6 uses &quot;photo&quot; instead
of &quot;ad&quot; in multiple places.&lt;/li&gt;
&lt;li&gt;In section 4.2 there is &lt;code&gt;map.connect
':controller/:action/:id/:userid:&lt;/code&gt;. The &lt;code&gt;:userid:&lt;/code&gt;
at the end should probably be &lt;code&gt;:user_id&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;In 4.9 a word &quot;engulf&quot; &lt;em&gt;could&lt;/em&gt; be replaced with some
more common word that non-native English speakers, such as myself,
would understand. Word &quot;capture&quot; comes to mind as a possible
replacement. Though it is easy to understand what it means by
reading a bit further.&lt;/li&gt;
&lt;li&gt;In section 5.0 there is a &lt;code&gt;/photo/new/1.xml&lt;/code&gt; as an
example. Don't know if this is intentional or not, but according to
my limited knowledge of Rails this example doesn't really make a
lot of sense as you're passing an id to &quot;new&quot; action. Even though
it is technically correct, perhaps a better example can be used if
its not intentional.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-09-18T00:45:24+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-18T00:45:26+01:00</updated-at>
      <user-id type="integer">718</user-id>
      <user-name>Nemanja</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Thanks for the great feedback, Nemanja. I'll fix up those things in the next version (to be pushed later tonight).</body>
      <body-html>&lt;div&gt;&lt;p&gt;Thanks for the great feedback, Nemanja. I'll fix up those things
in the next version (to be pushed later tonight).&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-09-18T01:33:37+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-18T01:33:38+01:00</updated-at>
      <user-id type="integer">7211</user-id>
      <user-name>Mike Gunderloy</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Mike, thanks for taking care of it so quickly. There is one thing that still confuses me though. In sections 4.2 and 4.3 there is &lt;code&gt;:user_id:&lt;/code&gt; and &lt;code&gt;:userid:&lt;/code&gt;. I am confused by that colon at the end. Is that just a typo or does it have some special meaning?</body>
      <body-html>&lt;div&gt;&lt;p&gt;Mike, thanks for taking care of it so quickly. There is one
thing that still confuses me though. In sections 4.2 and 4.3 there
is &lt;code&gt;:user_id:&lt;/code&gt; and &lt;code&gt;:userid:&lt;/code&gt;. I am confused
by that colon at the end. Is that just a typo or does it have some
special meaning?&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-09-18T09:47:47+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-18T09:47:49+01:00</updated-at>
      <user-id type="integer">718</user-id>
      <user-name>Nemanja</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>It means I'm an idiot. :) Fixed.</body>
      <body-html>&lt;div&gt;&lt;p&gt;It means I'm an idiot. :) Fixed.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-09-18T11:57:35+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-18T11:57:38+01:00</updated-at>
      <user-id type="integer">7211</user-id>
      <user-name>Mike Gunderloy</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Hi Mike

In section 1.1, you give an example HTTP request `GET /patient/17` -- perhaps use the default resourceful `GET /patients/17`, with patients in plural?</body>
      <body-html>&lt;div&gt;&lt;p&gt;Hi Mike&lt;/p&gt;
&lt;p&gt;In section 1.1, you give an example HTTP request &lt;code&gt;GET
/patient/17&lt;/code&gt; -- perhaps use the default resourceful &lt;code&gt;GET
/patients/17&lt;/code&gt;, with patients in plural?&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-09-23T22:49:08+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-23T22:49:12+01:00</updated-at>
      <user-id type="integer">17949</user-id>
      <user-name>Daniel Schierbeck</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Good point. I've made the change.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Good point. I've made the change.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-09-23T23:12:37+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-23T23:12:42+01:00</updated-at>
      <user-id type="integer">7211</user-id>
      <user-name>Mike Gunderloy</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Hi!
A very good guide, I have found it really helpful.

However I think I found a little typo error:
In section 3.9. (Namespaced Resources) you write path_prefix twice in the last two examples:

map.resources :tags, :path_prefix =&gt; 'admin_photo_', :path_prefix =&gt; 'admin/photos/:photo_id', :controller =&gt; 'admin/photo_tags'

Doesn't it should be :name_prefix and :path_prefix? Maybe I'm wrong...</body>
      <body-html>&lt;div&gt;&lt;p&gt;Hi! A very good guide, I have found it really helpful.&lt;/p&gt;
&lt;p&gt;However I think I found a little typo error: In section 3.9.
(Namespaced Resources) you write path_prefix twice in the last two
examples:&lt;/p&gt;
&lt;p&gt;map.resources :tags, :path_prefix =&amp;gt; 'admin_photo_',
:path_prefix =&amp;gt; 'admin/photos/:photo_id', :controller =&amp;gt;
'admin/photo_tags'&lt;/p&gt;
&lt;p&gt;Doesn't it should be :name_prefix and :path_prefix? Maybe I'm
wrong...&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-09-26T21:04:19+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-26T21:04:23+01:00</updated-at>
      <user-id type="integer">19122</user-id>
      <user-name>Csisz&#225;r Attila</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Thanks Csisz&#225;r. I just pushed up that fix, along with some other minor changes.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Thanks Csisz&amp;aacute;r. I just pushed up that fix, along with
some other minor changes.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-09-27T02:36:50+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-27T02:36:55+01:00</updated-at>
      <user-id type="integer">7211</user-id>
      <user-name>Mike Gunderloy</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>In the section on singular resources, it says that map.resource creates 7 named routes and then proceeds to show a table with 6 routes. 7 should be changed to 6, no?</body>
      <body-html>&lt;div&gt;&lt;p&gt;In the section on singular resources, it says that map.resource
creates 7 named routes and then proceeds to show a table with 6
routes. 7 should be changed to 6, no?&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-09-30T02:29:09+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-30T02:29:12+01:00</updated-at>
      <user-id type="integer">6372</user-id>
      <user-name>Fabio</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Yes. Good catch.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Yes. Good catch.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-09-30T02:44:25+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-30T02:44:30+01:00</updated-at>
      <user-id type="integer">7211</user-id>
      <user-name>Mike Gunderloy</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Also, in section 3.7.7, just below the resource code, it says that a named route will be generated called &quot;agency_photo_edit_path&quot;. I believe that should be &quot;agency_edit_photo_path&quot;.

Thank very much, by the way, for this doc. Great job.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Also, in section 3.7.7, just below the resource code, it says
that a named route will be generated called
&quot;agency_photo_edit_path&quot;. I believe that should be
&quot;agency_edit_photo_path&quot;.&lt;/p&gt;
&lt;p&gt;Thank very much, by the way, for this doc. Great job.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-09-30T02:49:23+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-30T02:49:29+01:00</updated-at>
      <user-id type="integer">6372</user-id>
      <user-name>Fabio</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Fixed, along with a couple of other route name mistakes.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Fixed, along with a couple of other route name mistakes.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-09-30T15:49:57+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-09-30T15:50:00+01:00</updated-at>
      <user-id type="integer">7211</user-id>
      <user-name>Mike Gunderloy</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>You could also mention about :namespace option, i found it useful for namespacing with subdomain_fu

you can define these routes
@@@ ruby
map.with_options(:namespace =&gt; 'admin/', :conditions =&gt; { :subdomain =&gt; 'admin'}) do |admin|
    admin.root :controller =&gt; 'admin/blogs'
    admin.resources :categories, :blogs
  end
@@@

instead of
@@@ ruby
map.with_options(:conditions =&gt; { :subdomain =&gt; 'admin'}) do |admin|
    admin.root :controller =&gt; 'admin/blogs'
    admin.resources :categories, :controller =&gt; 'admin/categories'
    admin.resources :blogs, :controller =&gt; 'admin/blogs'
  end
@@@

unfortunately it only works with resources</body>
      <body-html>&lt;div&gt;&lt;p&gt;You could also mention about :namespace option, i found it
useful for namespacing with subdomain_fu&lt;/p&gt;
&lt;p&gt;you can define these routes&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;
map.with_options(:namespace =&amp;gt; 'admin/', :conditions =&amp;gt; { :subdomain =&amp;gt; 'admin'}) do |admin|
    admin.root :controller =&amp;gt; 'admin/blogs'
    admin.resources :categories, :blogs
  end
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;instead of&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;
map.with_options(:conditions =&amp;gt; { :subdomain =&amp;gt; 'admin'}) do |admin|
    admin.root :controller =&amp;gt; 'admin/blogs'
    admin.resources :categories, :controller =&amp;gt; 'admin/categories'
    admin.resources :blogs, :controller =&amp;gt; 'admin/blogs'
  end
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;unfortunately it only works with resources&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-10-04T18:42:17+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-10-04T18:42:21+01:00</updated-at>
      <user-id type="integer">17448</user-id>
      <user-name>ronin</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Updated, along with a typo fix.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Updated, along with a typo fix.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-10-07T12:04:18+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-10-07T12:04:24+01:00</updated-at>
      <user-id type="integer">7211</user-id>
      <user-name>Mike Gunderloy</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I believe this is a typo:

&gt;4.5. Defining Defaults

&gt;You do not need to explicitly use the :controller and :action symbols within a route. You can supply defaults for these two parameters in a hash:

&gt;    map.connect 'photo/:id', :controller =&gt; 'photos', :action =&gt; 'show'

&gt;With this route, an incoming URL of /photos/12 would be dispatched to the show action within the Photos controller.

Since the route is singular--&quot;photo/:id&quot;--then the plural url--&quot;photos/12&quot;--wouldn't (AFAIK) match.</body>
      <body-html>&lt;div&gt;&lt;p&gt;I believe this is a typo:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;4.5. Defining Defaults&lt;/p&gt;
&lt;p&gt;You do not need to explicitly use the :controller and :action
symbols within a route. You can supply defaults for these two
parameters in a hash:&lt;/p&gt;
&lt;p&gt;map.connect 'photo/:id', :controller =&amp;gt; 'photos', :action
=&amp;gt; 'show'&lt;/p&gt;
&lt;p&gt;With this route, an incoming URL of /photos/12 would be
dispatched to the show action within the Photos controller.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Since the route is singular--&quot;photo/:id&quot;--then the plural
url--&quot;photos/12&quot;--wouldn't (AFAIK) match.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-11-09T06:25:12+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-11-09T06:25:13+00:00</updated-at>
      <user-id type="integer">28039</user-id>
      <user-name>Brandon Zylstra</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>There's a typo in 7.1. Using map.root:

map.index :controller =&gt; &quot;pages&quot;, :action =&gt; &quot;main&quot;

should be

map.index '', :controller =&gt; &quot;pages&quot;, :action =&gt; &quot;main&quot;</body>
      <body-html>&lt;div&gt;&lt;p&gt;There's a typo in 7.1. Using map.root:&lt;/p&gt;
&lt;p&gt;map.index :controller =&amp;gt; &quot;pages&quot;, :action =&amp;gt; &quot;main&quot;&lt;/p&gt;
&lt;p&gt;should be&lt;/p&gt;
&lt;p&gt;map.index '', :controller =&amp;gt; &quot;pages&quot;, :action =&amp;gt;
&quot;main&quot;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-11-24T14:32:53+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-11-24T14:32:56+00:00</updated-at>
      <user-id type="integer">38706</user-id>
      <user-name>zoopzoop</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Thanks folks. Typo fixes will be committed today.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Thanks folks. Typo fixes will be committed today.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-11-30T13:01:00+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-11-30T13:01:04+00:00</updated-at>
      <user-id type="integer">7211</user-id>
      <user-name>Mike Gunderloy</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7211</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Some places you use
@@@
map.with_options(:namespace =&gt; &quot;admin&quot;) do |admin|
@@@
while other places you use
@@@
map.namespace(:admin) do |admin|
@@@

For a new-comer like me, it's impossible to know what's best practice. Up until now I've used the latter method, but when reading this guide I was wondering if maybe with_options was better, but for generating namespaces only (without more options), the latter seems more convenient.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Some places you use&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
map.with_options(:namespace =&amp;gt; &amp;quot;admin&amp;quot;) do |admin|
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;while other places you use&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
map.namespace(:admin) do |admin|
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For a new-comer like me, it's impossible to know what's best
practice. Up until now I've used the latter method, but when
reading this guide I was wondering if maybe with_options was
better, but for generating namespaces only (without more options),
the latter seems more convenient.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-12-03T12:41:48+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: 
:assigned_user: 1366
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag>&quot;best practice&quot; namespaces routing</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-12-03T12:41:51+00:00</updated-at>
      <user-id type="integer">18776</user-id>
      <user-name>Peter Haza</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Mike Gunderloy</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7211</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>The typo in 4.5 (singular route and plural url, as mentioned by Brandon) is still there.</body>
      <body-html>&lt;div&gt;&lt;p&gt;The typo in 4.5 (singular route and plural url, as mentioned by
Brandon) is still there.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-12-03T19:20:39+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: &quot;\&quot;best practice\&quot; namespaces routing&quot;
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag>defaults defining typo</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-12-03T19:20:44+00:00</updated-at>
      <user-id type="integer">39689</user-id>
      <user-name>Vegar Vikan</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Mike Gunderloy</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7211</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Vegar - Actually, the typo is fixed. There's just a delay between fixes in the source and updates to the online version. If you want to check, you need to look at the docrails project on github to be sure.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Vegar - Actually, the typo is fixed. There's just a delay
between fixes in the source and updates to the online version. If
you want to check, you need to look at the docrails project on
github to be sure.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-12-04T14:26:09+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag>defaults defining typo</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2008-12-04T14:26:11+00:00</updated-at>
      <user-id type="integer">7211</user-id>
      <user-name>Mike Gunderloy</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Mike Gunderloy</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7211</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>In section 3.7 the last code example expect controller like &quot;adminphotos&quot;, &quot;adminvideos&quot; and not &quot;admin/photos&quot; and &quot;admin/videos&quot;.</body>
      <body-html>&lt;div&gt;&lt;p&gt;In section 3.7 the last code example expect controller like
&quot;adminphotos&quot;, &quot;adminvideos&quot; and not &quot;admin/photos&quot; and
&quot;admin/videos&quot;.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-02-04T10:36:26+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag>defaults defining typo</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2009-02-04T10:36:29+00:00</updated-at>
      <user-id type="integer">38165</user-id>
      <user-name>venlix</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Mike Gunderloy</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7211</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Excellent guide, improved my understanding of routes a lot.  I suggest you add another section in the &quot;Inspecting and Testing Routes&quot;:

8.2 Debugging routes in IRB

&gt;&gt; app.your_generator_path(@your, @generator)
...generates a nice path for you...

&gt;&gt; rts = ActionController::Routing::Routes ; nil
=&gt; nil
(; nil to suppress the visual diarrhea)

&gt;&gt; rts.generate_path({:controller =&gt; :generator})
... more verbose way to do what the generators do...

&gt;&gt; rts.recognize_path(&quot;/your/path/here&quot;)
...works...
&gt;&gt; rts.recognize_path(&quot;/your/path/here?some=argument&quot;)
...doesn't...

This information is out there, but scattered.  The &quot;app.your_generator_path&quot; tip is huge, and was difficult to unearth.

Also, if you know about techniques to directly inspect the RouteSet, that would be really helpful.  As I was coming up to speed on this stuff, it was very frustrating trying to figure out why things wouldn't generate.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Excellent guide, improved my understanding of routes a lot. I
suggest you add another section in the &quot;Inspecting and Testing
Routes&quot;:&lt;/p&gt;
&lt;p&gt;8.2 Debugging routes in IRB&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;app.your_generator_path(@your, @generator) ...generates a nice
path for you...&lt;/p&gt;
&lt;p&gt;rts = ActionController::Routing::Routes ; nil =&amp;gt; nil (; nil
to suppress the visual diarrhea)&lt;/p&gt;
&lt;p&gt;rts.generate_path({:controller =&amp;gt; :generator}) ... more
verbose way to do what the generators do...&lt;/p&gt;
&lt;p&gt;rts.recognize_path(&quot;/your/path/here&quot;) ...works...
rts.recognize_path(&quot;/your/path/here?some=argument&quot;)
...doesn't...&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;This information is out there, but scattered. The
&quot;app.your_generator_path&quot; tip is huge, and was difficult to
unearth.&lt;/p&gt;
&lt;p&gt;Also, if you know about techniques to directly inspect the
RouteSet, that would be really helpful. As I was coming up to speed
on this stuff, it was very frustrating trying to figure out why
things wouldn't generate.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-03-25T01:00:31+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:state: resolved
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state nil="true"></state>
      <tag>defaults defining typo</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2009-03-25T01:00:32+00:00</updated-at>
      <user-id type="integer">32839</user-id>
      <user-name>dondo (at dondo)</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Mike Gunderloy</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7211</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I would suggest two changes to this outstanding document. First, the initial metaphor feels a little clunky (though better than pigs -&gt; sausage ;-). I am thinking more along the lines of street address to driving directions, which has the advantage of being directly related to a different kind of routing. Personal taste, though.

Second, in the section on Testing, in addition to explaining the assertions, you should also at least outline _where_ these tests ought to go (unit, functional, integration, etc.), and probably include a link to the appropriate section of the Testing Guide, http://guides.rubyonrails.org/testing.html, for more details.</body>
      <body-html>&lt;div&gt;&lt;p&gt;I would suggest two changes to this outstanding document. First,
the initial metaphor feels a little clunky (though better than pigs
-&amp;gt; sausage ;-). I am thinking more along the lines of street
address to driving directions, which has the advantage of being
directly related to a different kind of routing. Personal taste,
though.&lt;/p&gt;
&lt;p&gt;Second, in the section on Testing, in addition to explaining the
assertions, you should also at least outline &lt;em&gt;where&lt;/em&gt; these
tests ought to go (unit, functional, integration, etc.), and
probably include a link to the appropriate section of the Testing
Guide, &lt;a href=
&quot;http://guides.rubyonrails.org/testing.html&quot;&gt;http://guides.rubyonrails.org/testing.html&lt;/a&gt;,
for more details.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-05-14T20:35:35+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: defaults defining typo
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state nil="true"></state>
      <tag>testing</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2009-05-14T20:35:38+01:00</updated-at>
      <user-id type="integer">17425</user-id>
      <user-name>Alderete</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Mike Gunderloy</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7211</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Gah. The Lighthouse comments form tags field should be additive, not replace all existing tags. Make deleting tags from a ticket a separate action. Sorry!</body>
      <body-html>&lt;div&gt;&lt;p&gt;Gah. The Lighthouse comments form tags field should be additive,
not replace all existing tags. Make deleting tags from a ticket a
separate action. Sorry!&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-05-14T20:37:19+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: testing
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state nil="true"></state>
      <tag>defaults defining testing typo</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2009-05-14T20:37:23+01:00</updated-at>
      <user-id type="integer">17425</user-id>
      <user-name>Alderete</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Mike Gunderloy</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7211</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I presume the period at the end of the blue code block in section 3.8 is a typo</body>
      <body-html>&lt;div&gt;&lt;p&gt;I presume the period at the end of the blue code block in
section 3.8 is a typo&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-07-02T12:40:48+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state nil="true"></state>
      <tag>defaults defining testing typo</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2009-07-02T12:40:52+01:00</updated-at>
      <user-id type="integer">58644</user-id>
      <user-name>steven_noble</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Mike Gunderloy</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7211</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Yeah, it is kind of inline code displayed in its own line... I've removed the period, it's not obvios so it may confuse.

Thanks!</body>
      <body-html>&lt;div&gt;&lt;p&gt;Yeah, it is kind of inline code displayed in its own line...
I've removed the period, it's not obvios so it may confuse.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-07-02T13:55:33+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:state: 
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>available</state>
      <tag>defaults defining testing typo</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2009-07-02T13:55:36+01:00</updated-at>
      <user-id type="integer">11378</user-id>
      <user-name>Xavier Noria</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Mike Gunderloy</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7211</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body></body>
      <body-html></body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-07-02T13:56:56+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:state: available
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>published</state>
      <tag>defaults defining testing typo</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2009-07-02T13:57:00+01:00</updated-at>
      <user-id type="integer">11378</user-id>
      <user-name>Xavier Noria</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Mike Gunderloy</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7211</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>This, in the testing routes section:

assert_routing { :path =&gt; &quot;photos&quot;, :method =&gt; :post }, { :controller =&gt; &quot;photos&quot;, :action =&gt; &quot;create&quot; }

gives me a syntax error (ruby 1.8.6 (2008-03-03 patchlevel 114)).

Adding the parentheses around the method call solves it:

assert_routing({ :path =&gt; &quot;photos&quot;, :method =&gt; :post }, { :controller =&gt; &quot;photos&quot;, :action =&gt; &quot;create&quot; })</body>
      <body-html>&lt;div&gt;&lt;p&gt;This, in the testing routes section:&lt;/p&gt;
&lt;p&gt;assert_routing { :path =&amp;gt; &quot;photos&quot;, :method =&amp;gt; :post }, {
:controller =&amp;gt; &quot;photos&quot;, :action =&amp;gt; &quot;create&quot; }&lt;/p&gt;
&lt;p&gt;gives me a syntax error (ruby 1.8.6 (2008-03-03 patchlevel
114)).&lt;/p&gt;
&lt;p&gt;Adding the parentheses around the method call solves it:&lt;/p&gt;
&lt;p&gt;assert_routing({ :path =&amp;gt; &quot;photos&quot;, :method =&amp;gt; :post }, {
:controller =&amp;gt; &quot;photos&quot;, :action =&amp;gt; &quot;create&quot; })&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-08-28T15:45:54+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>published</state>
      <tag>defaults defining testing typo</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2009-08-28T15:46:02+01:00</updated-at>
      <user-id type="integer">38831</user-id>
      <user-name>Balint Erdi</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Mike Gunderloy</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7211</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>There seems to be conflict between sections 3.7.0 and 3.10 (looks like they try to explain the same thing but in different ways). The first gives you the impression that you can create an admin section with &quot;map.with_options&quot; but it didn't work for me at all. 3.10 uses &quot;map.namespace&quot; and seems to work well. If you're reading top to bottom, and you're a moron like me, you get stumped until you try the example from 3.10.</body>
      <body-html>&lt;div&gt;&lt;p&gt;There seems to be conflict between sections 3.7.0 and 3.10
(looks like they try to explain the same thing but in different
ways). The first gives you the impression that you can create an
admin section with &quot;map.with_options&quot; but it didn't work for me at
all. 3.10 uses &quot;map.namespace&quot; and seems to work well. If you're
reading top to bottom, and you're a moron like me, you get stumped
until you try the example from 3.10.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-09-29T06:45:39+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: defaults defining testing typo
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>published</state>
      <tag>routes routing</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2009-09-29T06:45:45+01:00</updated-at>
      <user-id type="integer">71374</user-id>
      <user-name>hayesr</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Mike Gunderloy</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7211</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>for the last part of the fuide &quot;8.2 Testing Routes&quot; it may help beginners to get some tip where to test the routes, eg. in &quot;integration&quot; or &quot;functional&quot;
(since I'm using RSpec, I would place it in the controller section of the specs.</body>
      <body-html>&lt;div&gt;&lt;p&gt;for the last part of the fuide &quot;8.2 Testing Routes&quot; it may help
beginners to get some tip where to test the routes, eg. in
&quot;integration&quot; or &quot;functional&quot;&lt;br&gt;
(since I'm using RSpec, I would place it in the controller section
of the specs.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-10-18T22:42:35+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: routes routing
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>published</state>
      <tag>routes routing testing</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2009-10-18T22:42:38+01:00</updated-at>
      <user-id type="integer">73572</user-id>
      <user-name>thorsten</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Mike Gunderloy</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7211</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Section 2.5 has an id of &quot;regular-routes&quot;. Section 4 also has an id of &quot;regular-routes&quot;. This is not valid, but that's not really the issue. More troublesome is that when I click the table of contents item for Section 4, the browser takes me to section 2.5, the first instance of the id &quot;regular-routes&quot;, rather than to Section 4, where I want to navigate to. This happens in Safari 4 and Firefox 3.5. These two sections should have different IDs.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Section 2.5 has an id of &quot;regular-routes&quot;. Section 4 also has an
id of &quot;regular-routes&quot;. This is not valid, but that's not really
the issue. More troublesome is that when I click the table of
contents item for Section 4, the browser takes me to section 2.5,
the first instance of the id &quot;regular-routes&quot;, rather than to
Section 4, where I want to navigate to. This happens in Safari 4
and Firefox 3.5. These two sections should have different IDs.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-12-08T15:42:15+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>published</state>
      <tag>routes routing testing</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2009-12-08T15:42:21+00:00</updated-at>
      <user-id type="integer">34401</user-id>
      <user-name>Alex Kahn</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Mike Gunderloy</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7211</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>@Alex, that's right. These IDs are generated in an automatic manner and such a collision should be detected. Thanks for the comment.</body>
      <body-html>&lt;div&gt;&lt;p&gt;@Alex, that's right. These IDs are generated in an automatic
manner and such a collision should be detected. Thanks for the
comment.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-12-08T18:27:02+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>published</state>
      <tag>routes routing testing</tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2009-12-08T18:27:05+00:00</updated-at>
      <user-id type="integer">11378</user-id>
      <user-name>Xavier Noria</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Mike Gunderloy</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7211</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>hi,

--&gt; 4.9 Route Glogging 
map.connect ... :action =&gt; 'unknown', &lt;-- the little thing with big effekt!

psi</body>
      <body-html>&lt;div&gt;&lt;p&gt;hi,&lt;/p&gt;
&lt;p&gt;--&amp;gt; 4.9 Route Glogging map.connect ... :action =&amp;gt;
'unknown', &amp;lt;-- the little thing with big effekt!&lt;/p&gt;
&lt;p&gt;psi&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2010-01-24T16:58:16+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: routes routing testing
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">3</number>
      <permalink>routing-from-the-outside-in-cover-the-user-facing-features-of-routing</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>published</state>
      <tag nil="true"></tag>
      <title>Routing from the outside in. Cover the user-facing features of routing.</title>
      <updated-at type="datetime">2010-01-24T16:58:18+00:00</updated-at>
      <user-id type="integer">83786</user-id>
      <user-name>psi</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Mike Gunderloy</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/3</url>
    </version>
  </versions>
</ticket>
