Module: Extensions::Conditional::ActiveRecord::Base::ConditionClassMethods

Defined in:
lib/extensions/conditional/active_record/base.rb

Instance Method Summary collapse

Instance Method Details

#dependent_classObject

Class that the condition depends on.

Raises:

  • (NotImplementedError)

118
119
120
# File 'lib/extensions/conditional/active_record/base.rb', line 118

def dependent_class
  raise NotImplementedError, 'Subclasses must implement a dependent_class method.'
end

#evaluate_conditional_for(course_user) ⇒ Course::Conditional::ConditionalSatisfiabilityEvaluationJob

Evaluate and update the satisfied conditionals for the given course user.

Parameters:

  • course_user (CourseUser)

    The user with conditionals to be evaluated

Returns:


126
127
128
# File 'lib/extensions/conditional/active_record/base.rb', line 126

def evaluate_conditional_for(course_user)
  Course::Conditional::ConditionalSatisfiabilityEvaluationJob.perform_later(course_user)
end