Method: JSONAPI::Resource._model_class

Defined in:
lib/jsonapi/resource.rb

._model_classObject



930
931
932
933
934
935
936
937
# File 'lib/jsonapi/resource.rb', line 930

def _model_class
  return nil if _abstract

  return @model if @model
  @model = _model_name.to_s.safe_constantize
  warn "[MODEL NOT FOUND] Model could not be found for #{self.name}. If this a base Resource declare it as abstract." if @model.nil?
  @model
end