app/controllers/hyrax/dashboard/nest_collections_controller.rb
# link this collection as parent by adding existing collection as subcollection under this one
link this collection as parent by adding existing collection as subcollection under this one
link this collection as parent by adding existing collection as subcollection under this one
def create_relationship_under
        authorize! :read, form_params[:parent_id]
        if form.save
          notice = I18n.t('create_under', scope: 'hyrax.dashboard.nest_collections_form', child_title: form.child.title.first, parent_title: form.parent.title.first)
          redirect_to redirect_path(item: form.parent), notice: notice
        else
          redirect_to redirect_path(item: form.parent), flash: { error: form.errors.full_messages }
        end
      end
def create_relationship_under authorize! :read , form_params [ :parent_id ] if form . save notice = I18n . t ( 'create_under' , scope : 'hyrax.dashboard.nest_collections_form' , child_title : form . child . title . first , parent_title : form . parent . title . first ) redirect_to redirect_path ( item : form . parent ) , notice : notice else redirect_to redirect_path ( item : form . parent ) , flash : { error : form . errors . full_messages } end end
link this collection as parent by adding existing collection as subcollection under this one
link this collection as parent by adding existing collection as subcollection under this one