mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 13:15:40 +02:00
Backport Rails 5 API controller
This commit is contained in:
parent
157b383738
commit
41cb23f22f
4 changed files with 181 additions and 0 deletions
16
lib/action_controller/api/api_rendering.rb
Normal file
16
lib/action_controller/api/api_rendering.rb
Normal file
|
@ -0,0 +1,16 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActionController
|
||||
module ApiRendering
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
include Rendering
|
||||
end
|
||||
|
||||
def render_to_body(options = {})
|
||||
_process_options(options)
|
||||
super
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue