Module: SurveyorGui::Models::DependencyConditionMethods

Included in:
DependencyCondition
Defined in:
lib/surveyor_gui/models/dependency_condition_methods.rb

Defined Under Namespace

Classes: Rules

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/surveyor_gui/models/dependency_condition_methods.rb', line 5

def self.included(base)
  base.send :attr_accessible, :dependency_id, :rule_key, :question_id, :operator, :answer_id,
            :float_value, :integer_value, :join_operator, :column_id, :columns_attributes if defined? ActiveModel::MassAssignmentSecurity
  base.send :belongs_to, :dependency
  base.send :belongs_to, :column
  base.send :default_scope, lambda{ base.order('rule_key') }
end

Instance Method Details

#join_operatorObject



13
14
15
16
# File 'lib/surveyor_gui/models/dependency_condition_methods.rb', line 13

def join_operator
  rule = Rules.new(self)
  return rule.join_operator(self.rule_key)
end

#join_operator=(x) ⇒ Object



18
19
# File 'lib/surveyor_gui/models/dependency_condition_methods.rb', line 18

def join_operator=(x)
end