In the "Ruby on Rails tutorial" website:
http://railstutorial.org/chapters/filling-in-the-layout#sec:rails_routes,
section 5.2.2: Rails routes, it was mentioned that:
match '/about', :to => 'pages#about'
Creates the following "named routes" for use in the controllers and
views:
about_path => '/about'
about_url => 'http://localhost:3000/about'
After that, in section 5.2.3: Named routes:
"#" in: <%= link_to "About", '#' %>
Was replaced by: <%= link_to "About", about_path %>
From this thing, why did I use "about_path" here and NOT "about_url"?
Are they differeny then?
So, does "about_path" denote the controller's "action"?
Thanks.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment