Module: RESTFramework::BaseModelControllerMixin

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

Class Method Summary collapse

Methods included from BaseControllerMixin

#root

Class Method Details

.included(base) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/rest_framework/controller_mixins/models.rb', line 8

def self.included(base)
  if base.is_a? Class
    BaseControllerMixin.included(base)
    base.class_attribute(*[
      :model,
      :recordset,
      :fields,
      :action_fields,
      :native_serializer_config,
      :native_serializer_action_config,
      :filterset_fields,
      :allowed_parameters,
      :allowed_action_parameters,
      :serializer_class,
      :extra_member_actions,
      :disable_creation_from_recordset,
    ])
    base.alias_method(:extra_collection_actions=, :extra_actions=)
  end
end