app/forms/hyrax/forms/dashboard/nest_collection_form.rb
# ideally we would love to be able to eliminate collections which exceed the
# maximum nesting depth from the lists of available collections, but the queries
# needed to make the determination are too expensive to do for every possible
# collection, so we only test for this situation prior to saving the new
# relationship.
ideally we would love to be able to eliminate collections which exceed the
maximum nesting depth from the lists of available collections, but the queries
needed to make the determination are too expensive to do for every possible
collection, so we only test for this situation prior to saving the new
relationship.
ideally we would love to be able to eliminate collections which exceed the maximum nesting depth from the lists of available collections but the queries needed to make the determination are too expensive to do for every possible collection so we only test for this situation prior to saving the new relationship .
def nesting_within_maximum_depth
          return true if query_service.valid_combined_nesting_depth?(parent: parent, child: child, scope: context)
          errors.add(:collection, :exceeds_maximum_nesting_depth)
          false
        end
def nesting_within_maximum_depth return true if query_service . valid_combined_nesting_depth? ( parent : parent , child : child , scope : context ) errors . add ( :collection , :exceeds_maximum_nesting_depth ) false end
ideally we would love to be able to eliminate collections which exceed the
maximum nesting depth from the lists of available collections, but the queries
needed to make the determination are too expensive to do for every possible
collection, so we only test for this situation prior to saving the new
relationship.
ideally we would love to be able to eliminate collections which exceed the maximum nesting depth from the lists of available collections but the queries needed to make the determination are too expensive to do for every possible collection so we only test for this situation prior to saving the new relationship .