Class: ActsAsRecursiveTree::Options::Values::Relation

Inherits:
MultiValue
  • Object
show all
Defined in:
lib/acts_as_recursive_tree/options/values.rb

Instance Attribute Summary

Attributes inherited from Base

#config, #value

Instance Method Summary collapse

Methods inherited from MultiValue

#apply_negated_to, #apply_to

Methods inherited from Base

#apply_negated_to, #apply_to, #initialize

Constructor Details

This class inherits a constructor from ActsAsRecursiveTree::Options::Values::Base

Instance Method Details

#prepared_valueObject



60
61
62
63
64
# File 'lib/acts_as_recursive_tree/options/values.rb', line 60

def prepared_value
  select_manager = value.arel
  select_manager.projections.clear
  select_manager.project(select_manager.froms.last[config.primary_key])
end