From fc1a7fd23d2e10f6db4f1844694ad0c7114db27d Mon Sep 17 00:00:00 2001 From: Connor Turland Date: Sat, 12 Mar 2016 10:05:42 +1100 Subject: [PATCH] api: adjust serializers --- app/controllers/api/restful_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controllers/api/restful_controller.rb b/app/controllers/api/restful_controller.rb index ca7ff481..d6c544e2 100644 --- a/app/controllers/api/restful_controller.rb +++ b/app/controllers/api/restful_controller.rb @@ -17,6 +17,10 @@ class API::RestfulController < ActionController::Base private + def resource_serializer + "new_#{resource_name}_serializer".camelize.constantize + end + def accessible_records if current_user visible_records