File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33require 'jsonapi/response_document'
44require 'jsonapi/acts_as_resource_controller'
55require 'jsonapi/resource_controller'
6+ require 'jsonapi/resource_controller_metal'
67require 'jsonapi/resources/version'
78require 'jsonapi/configuration'
89require 'jsonapi/paginator'
Original file line number Diff line number Diff line change 11module JSONAPI
2- class ResourceController < ActionController ::Metal
3- MODULES = [
4- AbstractController ::Rendering ,
5- ActionController ::Rendering ,
6- ActionController ::Renderers ::All ,
7- ActionController ::StrongParameters ,
8- ActionController ::ForceSSL ,
9- ActionController ::Instrumentation ,
10- JSONAPI ::ActsAsResourceController
11- ] . freeze
12-
13- MODULES . each do |mod |
14- include mod
15- end
2+ class ResourceController < ActionController ::Base
3+ include JSONAPI ::ActsAsResourceController
164 end
175end
Original file line number Diff line number Diff line change 1+ module JSONAPI
2+ class ResourceControllerMetal < ActionController ::Metal
3+ MODULES = [
4+ AbstractController ::Rendering ,
5+ ActionController ::Rendering ,
6+ ActionController ::Renderers ::All ,
7+ ActionController ::StrongParameters ,
8+ ActionController ::ForceSSL ,
9+ ActionController ::Instrumentation ,
10+ JSONAPI ::ActsAsResourceController
11+ ] . freeze
12+
13+ MODULES . each do |mod |
14+ include mod
15+ end
16+ end
17+ end
Original file line number Diff line number Diff line change @@ -546,7 +546,7 @@ class Customer < Customer
546546end
547547
548548### CONTROLLERS
549- class AuthorsController < JSONAPI ::ResourceController
549+ class AuthorsController < JSONAPI ::ResourceControllerMetal
550550end
551551
552552class PeopleController < JSONAPI ::ResourceController
You can’t perform that action at this time.
0 commit comments