1

What is the difference between <route>_path and <route>_url in the Ruby on Rails?

For example, we use route_path and route_url in the route.rb file of the rails.

mrzasa
  • 22,895
  • 11
  • 56
  • 94
Shekhar Patil
  • 337
  • 4
  • 14
  • 3
    Possible duplicate of [Named routes \_path vs \_url](https://stackoverflow.com/questions/11939865/named-routes-path-vs-url) – jvillian Nov 30 '18 at 14:40

1 Answers1

4

*_path returns just a path part of the url, e.g. /documents/1, *_url gives you full URL with protocol and host https://myapp.com/documents/1

mrzasa
  • 22,895
  • 11
  • 56
  • 94