On Jan 4, 7:44 pm, SW Engineer <li...@ruby-forum.com> wrote:
> In this case, how do we read:
>
> match '/about', :to => 'pages#about'
>
> I mean, what does the preceding statement say? Where is the URL here?
>
The host and protocol bit are are about allowing the browser to talk
to the right url - once the request has made it to your server, only
the path matters (unless you've got some account as subdomain stuff
going on)
A lot of the time in your app you only need the _path helpers, because
you're just linking between pages in your app (although it wouldn't
hurt to use the _url helpers). Sometimes you need a full url (eg for
putting links in an email) and so those helpers are there too.
Fred
> Thanks.
>
> --
> Posted viahttp://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