Class: DependentOptionChecker::Checker::DependentChecker
- Inherits:
-
Object
- Object
- DependentOptionChecker::Checker::DependentChecker
- Defined in:
- lib/dependent_option_checker/checker/dependent_checker.rb
Constant Summary collapse
- DEPENDENT_OPTION_VALUES =
i[ destroy destroy_async delete_all nullify restrict_with_exception restrict_with_error ].freeze
Instance Method Summary collapse
- #extract_unspecified_relations ⇒ Object
-
#initialize(model) ⇒ DependentChecker
constructor
A new instance of DependentChecker.
Constructor Details
#initialize(model) ⇒ DependentChecker
Returns a new instance of DependentChecker.
17 18 19 |
# File 'lib/dependent_option_checker/checker/dependent_checker.rb', line 17 def initialize(model) @model = model end |
Instance Method Details
#extract_unspecified_relations ⇒ Object
21 22 23 24 25 |
# File 'lib/dependent_option_checker/checker/dependent_checker.rb', line 21 def extract_unspecified_relations reflections.filter_map do |reflection| option_specified?(reflection.) ? nil : reflection.name.to_s end end |