app/controllers/hyrax/dashboard/nest_collections_controller.rb
def create_relationship_within
        authorize! :read, form_params[:child_id]

        if form.save
          notice = I18n.t('create_within', scope: 'hyrax.dashboard.nest_collections_form', child_title: form.child.title.first, parent_title: form.parent.title.first)
          redirect_to redirect_path(item: form.child), notice: notice
        else
          redirect_to redirect_path(item: form.child), flash: { error: form.errors.full_messages }
        end
      end
# Add this collection as a subcollection within another existing collection
Add this collection as a subcollection within another existing collection
Add this collection as a subcollection within another existing collection
def create_relationship_within
        authorize! :read, form_params[:child_id]
        if form.save
          notice = I18n.t('create_within', scope: 'hyrax.dashboard.nest_collections_form', child_title: form.child.title.first, parent_title: form.parent.title.first)
          redirect_to redirect_path(item: form.child), notice: notice
        else
          redirect_to redirect_path(item: form.child), flash: { error: form.errors.full_messages }
        end
      end
def create_relationship_within authorize! :read , form_params [ :child_id ] if form . save notice = I18n . t ( 'create_within' , scope : 'hyrax.dashboard.nest_collections_form' , child_title : form . child . title . first , parent_title : form . parent . title . first ) redirect_to redirect_path ( item : form . child ) , notice : notice else redirect_to redirect_path ( item : form . child ) , flash : { error : form . errors . full_messages } end end
Add this collection as a subcollection within another existing collection
Add this collection as a subcollection within another existing collection