Respond with 404 when there is no matching FC class #24

Open
wants to merge 4 commits into
from

Conversation

Projects
None yet
2 participants

When an ActionController method that corresponds to the URL is missing, it throws an ActionNotFound exception and a custom error page is rendered. This is helpful in production. Do you think something similar should happen in FC too?

Owner

jonleighton commented Jan 8, 2013

Yes, I reckon so.

Just remembered about this and even created a patch, but then realized that it's not an issue if available actions are specified via only and except options on resources because in that case rails already returns 404.

Owner

jonleighton commented Mar 23, 2013

Yeah, proper use of only and except prevents this, but I still think it would be nice to return a 404 by default rather than the "constant not found" error we get at the moment.

Owner

jonleighton commented Mar 23, 2013

Would be good to see the patch if you've written it anyway!

Cool, attached the patch.

Owner

jonleighton commented Mar 24, 2013

Sweet, patch looks good but the build seems to be broken: https://travis-ci.org/jonleighton/focused_controller/builds/5760415 any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment