Skip to content
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

parametrized routes #1

Open
plentz opened this issue May 19, 2011 · 2 comments
Open

parametrized routes #1

plentz opened this issue May 19, 2011 · 2 comments

Comments

@plentz
Copy link

plentz commented May 19, 2011

If I have a matcher like this(parametrized):

match "/:controller/foo", :to =>  ":controller#foo"

It says that it's an unused route and as a consequence, it says that my action methods #foo are unreachable.

@amatsuda
Copy link
Owner

Hmm, I haven't imagined that case.
Are you sure you do use that sort of route in your real world app?
IMO, wildcard routes should basically be avoided to use, since it's hard to trace which action method is actually in use and which action is not. That is totally un-RESTful.
For example, how can you add a new resource that does not respond to #foo in your example routes?

@plentz
Copy link
Author

plentz commented May 25, 2011

Yup, we use. It's just a helper method that we add in some controllers to make the app ajaxier. Since it's easier to map it with the wildcard, we preferred that way instead of doing one-by-one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants