Sunday, January 5, 2014

Rails: to see path for a given named-route

In "rails console":

if login_path is a route-name, we can get the actual path via:

Rails.application.class.routes.url_helpers.login_path

No comments:

Post a Comment

Followers

Blog Archive