Class: Serega::SeregaValidations::Attribute::CheckOptPreloadPath
- Inherits:
-
Object
- Object
- Serega::SeregaValidations::Attribute::CheckOptPreloadPath
- Defined in:
- lib/serega/validations/attribute/check_opt_preload_path.rb
Overview
Validator for attribute :preload_path option
Class Method Summary collapse
-
.call(opts) ⇒ void
Checks preload_path option.
Class Method Details
.call(opts) ⇒ void
This method returns an undefined value.
Checks preload_path option
20 21 22 23 24 25 26 27 28 |
# File 'lib/serega/validations/attribute/check_opt_preload_path.rb', line 20 def call(opts) return if exactly_nil?(opts, :preload_path) # allow to provide nil anyway path = opts[:preload_path] (path, opts) return unless opts[:serializer] check_allowed(path, opts) end |