Module: RESTFramework::Mixins::BulkUpdateModelMixin

Defined in:
lib/rest_framework/mixins/bulk_model_controller_mixin.rb

Overview

Mixin for updating records in bulk.

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/rest_framework/mixins/bulk_model_controller_mixin.rb', line 13

def self.included(base)
  RESTFramework.deprecator.warn(<<~TXT).squish
    BulkUpdateModelMixin is deprecated; set the `bulk = true`, and `excluded_actions` class
    attributes instead.
  TXT

  base.bulk = true
  base.excluded_actions = (base.excluded_actions - [ :update_all ]).freeze
end