Module: RESTFramework::BaseModelControllerMixin::ClassMethods
- Extended by:
- ClassMethodHelpers
- Defined in:
- lib/rest_framework/controllers/models.rb
Overview
By default (and for now), we will just use ‘as_json`, but we should consider supporting:
active_model_serializers (problem:
https://github.com/rails-api/active_model_serializers#whats-happening-to-ams)
fast_jsonapi (really good and fast serializers)
Instance Method Summary collapse
-
#extra_actions(skip_undefined: true) ⇒ Object
For model-based mixins, ‘@extra_collection_actions` is synonymous with `@extra_actions`.
Methods included from ClassMethodHelpers
Methods included from RESTFramework::BaseControllerMixin::ClassMethods
Instance Method Details
#extra_actions(skip_undefined: true) ⇒ Object
For model-based mixins, ‘@extra_collection_actions` is synonymous with `@extra_actions`.
36 37 38 39 40 41 42 43 |
# File 'lib/rest_framework/controllers/models.rb', line 36 def extra_actions(skip_undefined: true) actions = ( _restframework_try_class_level_variable_get(:extra_collection_actions) || _restframework_try_class_level_variable_get(:extra_actions, default: {}) ) actions = actions.select { |a| self.method_defined?(a) } if skip_undefined return actions end |