1

What is the difference between _path and _url in the ruby on rails?

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

jvillian
  • 19,492
  • 5
  • 28
  • 41
Shekhar Patil
  • 327
  • 4
  • 13

1 Answers1

1

*_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,227
  • 11
  • 53
  • 93