Class: Wallaby::Configuration::Models Deprecated

Inherits:
Object
  • Object
show all
Defined in:
lib/wallaby/configuration/models.rb

Overview

Deprecated.

Instance Method Summary collapse

Instance Method Details

#exclude(*_models) ⇒ Object

Deprecated.


26
27
28
29
30
31
32
33
34
# File 'lib/wallaby/configuration/models.rb', line 26

def exclude(*_models)
  Deprecator.alert 'config.models.exclude', from: '0.3.0', alternative: <<~INSTRUCTION
    Please set #models_to_exclude from the controller instead, for example:

      class Admin::ApplicationController < Wallaby::ResourcesController
        self.models_to_exclude User, 'Product'
      end
  INSTRUCTION
end

#excludesObject

Deprecated.


37
38
39
40
41
# File 'lib/wallaby/configuration/models.rb', line 37

def excludes
  Deprecator.alert 'config.models.excludes', from: '0.3.0', alternative: <<~INSTRUCTION
    Please use controller_class.models_to_exclude instead.
  INSTRUCTION
end

#presenceObject

Deprecated.


19
20
21
22
23
# File 'lib/wallaby/configuration/models.rb', line 19

def presence
  Deprecator.alert 'config.models.presence', from: '0.3.0', alternative: <<~INSTRUCTION
    Please use controller_class.models instead.
  INSTRUCTION
end

#set(*_models) ⇒ Object

Deprecated.


8
9
10
11
12
13
14
15
16
# File 'lib/wallaby/configuration/models.rb', line 8

def set(*_models)
  Deprecator.alert 'config.models.set', from: '0.3.0', alternative: <<~INSTRUCTION
    Please set #models= from the controller instead, for example:

      class Admin::ApplicationController < Wallaby::ResourcesController
        self.models = User, 'Product'
      end
  INSTRUCTION
end