New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
default path #10
Comments
You can specify a default action that will be called if none are provided upon page load via the
Then you can specify that as an action:
If a user lands on your page with no route specified, it will automatically go to the root path. This can be anything; you just need to assign an action to that route via the usual Hope my answer was helpful. If so, please ask again, and/or close the question. |
I have not heard any issue with this in over 1 month. I take it my comment solved the problem. If there are any further issues, please feel free to open a new issue. |
Can you explain how to use Path.root to achieve the same functionality presented in this tutorial? http://mtrpcic.net/2011/02/fragment-uris-theyre-not-as-bad-as-you-think-really/ |
That post doesn't make use of path.root, it uses the Path.default function. You'll have to have accompanying server-side code to modify the returned HTML. |
In some previous documentation it seemed like there a default function you could set if no paths matched. I want to use this but it seems to be missing in the current version. I tried using rescue for this but it doesn't work in the same way (doesn't set the window location)
Is there any way to apply a default function to all paths?
Maybe one way to do this is to include the same wildcard functionality as in rails routes using *
Path.map("/*path")
The text was updated successfully, but these errors were encountered: