aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/api
diff options
context:
space:
mode:
authorJon Moss <me@jonathanmoss.me>2016-01-20 19:16:23 -0500
committerJon Moss <me@jonathanmoss.me>2016-01-20 19:16:23 -0500
commit77acc004efad07dfd4d4f83be14ef897968a3fd9 (patch)
tree9742420e0f68a49460a81c7ae6761998c1b14b8e /actionpack/lib/action_controller/api
parent06397336b2c9b1de9462f1baa8075573fd3709dd (diff)
downloadrails-77acc004efad07dfd4d4f83be14ef897968a3fd9.tar.gz
rails-77acc004efad07dfd4d4f83be14ef897968a3fd9.tar.bz2
rails-77acc004efad07dfd4d4f83be14ef897968a3fd9.zip
Re-add ActionController::ApiRendering
- Fixes bug #23142. - Bug was occurring only with ActionController::API, because `_process_options` wasn't being run for API requests, even though it was being run for normal app requests.
Diffstat (limited to 'actionpack/lib/action_controller/api')
-rw-r--r--actionpack/lib/action_controller/api/api_rendering.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/api/api_rendering.rb b/actionpack/lib/action_controller/api/api_rendering.rb
new file mode 100644
index 0000000000..3a08d28c39
--- /dev/null
+++ b/actionpack/lib/action_controller/api/api_rendering.rb
@@ -0,0 +1,14 @@
+module ActionController
+ module ApiRendering
+ extend ActiveSupport::Concern
+
+ included do
+ include Rendering
+ end
+
+ def render_to_body(options = {})
+ _process_options(options)
+ super
+ end
+ end
+end