Class: Serega::SeregaValidations::Attribute::CheckOptPreload

Inherits:
Object
  • Object
show all
Defined in:
lib/serega/validations/attribute/check_opt_preload.rb

Overview

Validator for attribute :preload option

Class Method Summary collapse

Class Method Details

.call(opts) ⇒ void

This method returns an undefined value.

Checks :preload option

Parameters:

  • opts (Hash)

    Attribute options

Raises:



19
20
21
22
23
24
# File 'lib/serega/validations/attribute/check_opt_preload.rb', line 19

def call(opts)
  return unless opts.key?(:preload)

  check_opt_preload(opts)
  check_usage_with_other_params(opts)
end