app/forms/hyrax/forms/dashboard/nest_collection_form.rb
def validate_add
          if parent.try(:nestable?)
            nesting_within_maximum_depth
          else
            errors.add(:parent, :cannot_have_child_nested)
            false
          end
        end
# when creating a NEW collection, we need to do some basic validation before
# rerouting to new_dashboard_collection_path to add the new collection as
# a child. Since we don't yet have a child collection, the valid? option can't be used here.
when creating a NEW collection, we need to do some basic validation before
rerouting to new_dashboard_collection_path to add the new collection as
a child. Since we don't yet have a child collection, the valid. option can't be used here.
when creating a NEW collection we need to do some basic validation before rerouting to new_dashboard_collection_path to add the new collection as a child . Since we don ' t yet have a child collection the valid . option can ' t be used here .
def validate_add
          if parent.try(:nestable?)
            nesting_within_maximum_depth
          else
            errors.add(:parent, :cannot_have_child_nested)
            false
          end
        end
def validate_add if parent . try ( :nestable? ) nesting_within_maximum_depth else errors . add ( :parent , :cannot_have_child_nested ) false end end
when creating a NEW collection, we need to do some basic validation before
rerouting to new_dashboard_collection_path to add the new collection as
a child.
when creating a NEW collection we need to do some basic validation before rerouting to new_dashboard_collection_path to add the new collection as a child .