Guys,
I am starting to read the RailsGuides and I figure I'd make notes of errors and minor suggestions as I go along. Please let me know if there is a better way for me to provide continued feedback if email is not the best form.
Following are some of my suggestions for:
Rails Routing from the Outside In
*) 1.1 Connecting URLs to Code
[suggested change] the request is dispatched to the patients controller�s show action with { :id => �17� } in params.
[with] the request is dispatched to the patients controller�s show action with { :id => �17� }, you can then read the parameter value with params[:id].
*) 1.2 Generating Paths and URLs from Code
the id does not need to be specified in the path helper
[change] <%= link_to "Patient Record", patients_path(@patient.id) %>
[with] <%= link_to "Patient Record", patients_path(@patient) %>
*) In section 2.1 Resources on the Web why not move the following list to the end of section 2.2 CRUD, Verbs, and Actions for clear demonstration of use
[move following section] When your Rails application receives an incoming request for DELETE /photos/17
it asks the router to map it to a controller action. If the first matching route is resources :photos
Rails would dispatch that request to the destroy method on the photos controller with { :id => �17� } in params.
*) 2.3 Paths and URLs
[correct] # edit_photo_path returns /photos/edit
[with] # edit_photo_path(id) returns /photos/:id/edit
*) 2.6 Controller Namespaces and Routing since other following examples mention singular forms, what is the singular form for
namespace "admin" do resources :posts, :comments end
*) 3.1 Bound Parameters
at the end of this section it's states:
This route will also route the incoming request of /photos to PhotosController, since :action and :id are optional parameters, denoted by parentheses.
Can you specify what the default action is called? it is index??
*) 3.6 Naming Routes there seems to be an error on the last sentence
[fix] Calling logout_path will return /logout
[with] Calling logout_path will return /exit