Module: ActiveConformity::ConformableExtensions::ClassMethods
- Defined in:
- lib/active_conformity/conformable_extensions.rb
Instance Method Summary collapse
Instance Method Details
#conforming_dependents(*dependents) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/active_conformity/conformable_extensions.rb', line 13 def conforming_dependents(*dependents) association_names = self.reflect_on_all_associations.map(&:name) dependents.each do |d| if !association_names.include?(d) raise "NOT A VALID DEPENDENT, MUST BE ONE OF THE MODEL'S ASSOCIATIONS!" end end @dependents = dependents end |
#dependents ⇒ Object
9 10 11 |
# File 'lib/active_conformity/conformable_extensions.rb', line 9 def dependents @dependents end |