mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
Merge branch 'master' into tailwind-redesign
This commit is contained in:
commit
7676742058
@ -17,7 +17,8 @@ class FoldersController < ApplicationController
|
||||
|
||||
def destroy
|
||||
# Relocate all documents in this folder to the root "folder"
|
||||
Document.where(folder_id: @folder.id).update_all(folder_id: nil)
|
||||
# TODO - I think we can handle this at the model association level with dependent: nullify, but I've never used it
|
||||
Document.with_deleted.where(folder_id: @folder.id).update_all(folder_id: nil)
|
||||
|
||||
# Relocate all child folders in this folder to the root "folder"
|
||||
Folder.where(parent_folder_id: @folder.id).update_all(parent_folder_id: nil)
|
||||
|
||||
@ -2,7 +2,7 @@ class PageCollectionSubmissionsController < ApplicationController
|
||||
before_action :set_page_collection, only: [:index]
|
||||
before_action :set_page_collection_submission, only: [:show, :edit, :update, :destroy, :approve, :pass]
|
||||
|
||||
before_action :require_collection_ownership, only: [:index, :edit, :update, :destroy, :pass, :approve]
|
||||
before_action :require_collection_ownership, only: [:index]
|
||||
|
||||
# GET /page_collection_submissions
|
||||
def index
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
class ShareCommentsController < ApplicationController
|
||||
before_action :authenticate_user!
|
||||
|
||||
before_action :set_share_comment, only: [:update, :destroy]
|
||||
|
||||
# POST /share_comments
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
class Folder < ApplicationRecord
|
||||
has_many :documents
|
||||
|
||||
belongs_to :parent_folder, optional: true, class_name: Folder.name, foreign_key: :parent_folder_id
|
||||
belongs_to :user
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user