Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaydev committed Jan 1, 2011
1 parent 56221fa commit ebb732a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions railties/guides/source/routing.textile
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ You specify a request-based constraint the same way that you specify a segment c
match "photos", :constraints => {:subdomain => "admin"}
</ruby>

You can also specify constrains in a block form:
You can also specify constraints in a block form:

<ruby>
namespace :admin do
Expand Down Expand Up @@ -598,7 +598,7 @@ You can specify what Rails should route +"/"+ to with the +root+ method:
root :to => 'pages#main'
</ruby>

You should put the +root+ route at the end of the file. You also need to delete the public/index.html.erb file for the root route to take effect.
You should put the +root+ route at the end of the file. You also need to delete the +public/index.html+ file for the root route to take effect.

h3. Customizing Resourceful Routes

Expand Down Expand Up @@ -633,7 +633,7 @@ You can use the +:constraints+ option to specify a required format on the implic
resources :photos, :constraints => {:id => /[A-Z][A-Z][0-9]+/}
</ruby>

This declaration constrains the +:id+ parameter to match the supplied regular expression. So, in this case, the router would no longer match +/photos/1+ to this route. Instead, +/photos/RR27+ would match.
This declaration constraints the +:id+ parameter to match the supplied regular expression. So, in this case, the router would no longer match +/photos/1+ to this route. Instead, +/photos/RR27+ would match.

You can specify a single constraint to apply to a number of routes by using the block form:

Expand Down

0 comments on commit ebb732a

Please sign in to comment.