Module | Mongoid::Relations::Options |
In: |
lib/mongoid/relations/options.rb
|
This module contains the validating logic for options passed to relation macros.
COMMON | = | [ :class_name, :extend, :inverse_class_name, :inverse_of, :name, :relation, :validate | These options are available to all relations. |
Determine if the provided options are valid for the relation.
@example Check the options.
Options.validate!(:name => :comments)
@param [ Hash ] options The options to check.
@raise [ ArgumentError ] If the options are invalid.
@return [ true, false ] If the options are valid.
@since 2.1.0