All url / path helpers are compiled into functions in the YourApp.Router.Helpers module. You can import it and call it with the same arguments as in your templates (you would probably pass conn as the first argument, but since we don't have conn in the iex session, you can pass YourApp.Endpoint ):
iex(1)> import YourApp.Router.Helpers nil iex(2)> page_path(YourApp.Endpoint, :index) "/" iex(3)> task_path(YourApp.Endpoint, :show, 1) "/tasks/1"
(I have resources "/tasks", TaskController in this project.)
source share