Module: RESTFramework::ShowModelMixin
- Included in:
- ModelControllerMixin, ReadOnlyModelControllerMixin
- Defined in:
- lib/rest_framework/controller_mixins/models.rb
Overview
Mixin for showing records.
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
245 246 247 |
# File 'lib/rest_framework/controller_mixins/models.rb', line 245 def show api_response(self.show!) end |
#show! ⇒ Object
249 250 251 252 |
# File 'lib/rest_framework/controller_mixins/models.rb', line 249 def show! @record ||= self.get_record return self.get_serializer_class.new(@record, controller: self).serialize end |