Module: RESTFramework::Mixins::DestroyModelMixin

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

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



65
66
67
68
69
70
71
72
73
# File 'lib/rest_framework/mixins/model_controller_mixin.rb', line 65

def self.included(base)
  RESTFramework.deprecator.warn(
    "DestroyModelMixin is deprecated; set the `excluded_actions` class attribute instead.",
  )

  if base.excluded_actions
    base.excluded_actions = (base.excluded_actions - [ :destroy ]).freeze
  end
end