4 ms·
In general I’d say testing the method in a controller is a smell,and in this particular case I’d suggest GET and POST should never have been handled by the same
by femto113 7y ago
In general I’d say testing the method in a controller is a smell,and in this particular case I’d suggest GET and POST should never have been handled by the same function. If GET did nothing but render the view sending a HEAD would be harmless.
- diminoten 7y agoYeah the "if GET" code raised my eyebrows a bit, I know rails can handle separate GET and POST funcs.
- icebraining 7y agoWhile you're not wrong, if I explicitly tell the framework to only accept GET and POST, I consider it a bug if any other method "gets through", particularly since the docs don't say that can happen.