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

Some feature names collide with Action routes #80

Closed
carlthuringer opened this issue Aug 27, 2015 · 2 comments
Closed

Some feature names collide with Action routes #80

carlthuringer opened this issue Aug 27, 2015 · 2 comments
Assignees

Comments

@carlthuringer
Copy link

I ran into an issue implementing my first feature, refactor-images. The application would crash with a bizarre error: Flipper::UI::RequestMethodNotSupported - Flipper::UI::Actions::File does not support request method "post"
This happened when I tried to add a specific actor using the UI.

This made me think that I had broken it somehow, or otherwise set it up incorrectly, but my only mistake was treading upon A Regular Expression

I discovered my error by the expedient combo of debugging, stepping, and print @action_collection.method(:action_for_request).source. But of course I think more common consumers of the gem may be completely confused and give up or post an issue.

Shouldn't you specify the route match more strictly, rather than matching any part of the full path?

route %r{\a#{base_path}(images|css|js|octicons|fonts)/.*\Z}

Else, no features containing these five words will be permitted.

@jnunemaker
Copy link
Collaborator

That stinks. Sorry. Added a spec and fixed it by adjusting the order of the action collection and thus route processing. Released 0.7.1 which should solve your issue.

@jnunemaker
Copy link
Collaborator

Oh, big thanks for tracking it down too. Made fixing it easy.

@jnunemaker jnunemaker self-assigned this Aug 27, 2015
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