Module: Authify::API::JSONAPIUtils

Overview

JSON API related Model utility methods

Instance Method Summary collapse

Instance Method Details

#jsonapi_serializer_class_nameObject



5
6
7
8
9
# File 'lib/authify/api/jsonapi_utils.rb', line 5

def jsonapi_serializer_class_name
  this_class = self.class.name.split('::').last
  new_class = "Authify::API::Serializers::#{this_class}Serializer"
  new_class.split('::').inject(Object) { |o, c| o.const_get c }
end