Open BenGitsCode opened 7 years ago
No longer needed in rails 5
Also present in a few specs in master branch.
Removing before_action
that sets request.format = :json
from application_controller.rb
, too, and things seem to not break on either branch. I don't believe it's needed:
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -2,11 +2,6 @@
class ApplicationController < ActionController::API
- # Force to wants JSON for API
- before_action :api_request_settings
- def api_request_settings
- request.format = :json
- end
- private :ssl_configured?, :api_request_settings
+ private :ssl_configured?
Remove:
format: :json