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
13
lib/action_controller/metal/basic_implicit_render.rb
Normal file
13
lib/action_controller/metal/basic_implicit_render.rb
Normal file
|
@ -0,0 +1,13 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActionController
|
||||
module BasicImplicitRender # :nodoc:
|
||||
def send_action(method, *args)
|
||||
super.tap { default_render unless performed? }
|
||||
end
|
||||
|
||||
def default_render(*args)
|
||||
head :no_content
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue