Hi there,

With *_url you'll get the full path with protocol and domain name. Use
it for redirect method for example, or when you redirecting for total
different domain.

With *_path you will get the part from your path which is after '/'
without domain and stuff. Use it every other situation I think.

With redirecting _path will also work fine, just later it can cause
problems when you need to refactor your code. And an easy link_to can
be used with _url, but it fills your HTML unnecessary characters,
which also not a good idea.

Check both, see the source of your HTML and you will see easily the
diff.

good luck,
gezope

On febr. 15, 22:05, Rodrigo Alves Vieira <[email protected]> wrote:
> Hello everyone, what's the real difference between root_url and root_path in
> Rails, for example. Apparently both lead to the same route in the
> application.
>
> Thanks!

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to