Module: RESTFramework::ShowModelMixin

Included in:
ModelControllerMixin, ReadOnlyModelControllerMixin
Defined in:
lib/rest_framework/controller_mixins/models.rb

Instance Method Summary collapse

Instance Method Details

#showObject



158
159
160
161
162
163
164
# File 'lib/rest_framework/controller_mixins/models.rb', line 158

def show
  @record = self.get_record
  @serialized_record = self.get_serializer_class.new(
    object: @record, controller: self
  ).serialize
  return api_response(@serialized_record)
end