Include ControllerSupport on ActiveSupport on_load action_controller

This commit is contained in:
Ben Mills 2016-05-17 09:35:43 -06:00
parent 070d58eacf
commit 7356071ea0
No known key found for this signature in database
GPG Key ID: F362D7A1BB9F775F

View File

@ -60,4 +60,6 @@ ActionController::Renderers.add :jsonapi do |json, options|
self.response_body = json
end
ActionController::Base.send :include, ActiveModelSerializers::Jsonapi::ControllerSupport
ActiveSupport.on_load(:action_controller) do
include ActiveModelSerializers::Jsonapi::ControllerSupport
end