Module: IdsOfAllDependenciesNested
- Defined in:
- lib/ids_of_all_dependencies_nested.rb
Instance Method Summary collapse
Instance Method Details
#ids_of_all_dependencies_nested(depth = Float::INFINITY) ⇒ Object
2 3 4 5 6 7 |
# File 'lib/ids_of_all_dependencies_nested.rb', line 2 def ids_of_all_dependencies_nested(depth = Float::INFINITY) result = depth > 0 ? get_associations(depth) : {} result[:id] = id result = result[:id] if result.size == 1 result end |