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

Unable to retrieve format-specific version of a resource (e.g. /people/1471.json) #61

Open
hackervera opened this issue Dec 22, 2011 · 2 comments
Labels

Comments

@hackervera
Copy link

no .json resource
http://epdx.org/people/1471.json

@LeifWarner
Copy link

Duplicate of #62

@igal
Copy link
Collaborator

igal commented Dec 23, 2011

Thanks for filing this report. I can confirm this is a problem for all our controllers, not just people. I've updated the title to clear this up.

I'm certain that this feature used to work. I've reviewed our routes and the respond_to code declaring this functionality, and they look fine. We haven't touched the code declaring this in a long time, so I don't think we broke it. My theory is this is a problem caused by a newer version of Rails or inherited_resources.

When I stepped through the code with a debugger, I found that requesting a format-specific path (e.g. /foo/123.json) would cause the system to redirect to a generic path (e.g. /foo/123) before the controller's show action was called, so I can't even provide an easy workaround.

If someone has some time to dig through the inherited_resources library, I'd appreciate it. I'd recommend reading through it to figure out how it implements the show action and how this handles the respond_to information, because I believe the problem is there.

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

No branches or pull requests

3 participants