Remove new_nested action from documents controller. Use cocoon gem to manage new nested fields creation on documents.

This commit is contained in:
Senén Rodero Rodríguez
2017-09-22 16:30:32 +02:00
parent 3745e76c07
commit 88a7a29d27
24 changed files with 175 additions and 194 deletions

View File

@@ -1,7 +1,7 @@
class DocumentsController < ApplicationController
before_action :authenticate_user!
before_action :find_documentable, except: :destroy
before_action :prepare_new_document, only: [:new, :new_nested]
before_action :prepare_new_document, only: [:new]
before_action :prepare_document_for_creation, only: :create
load_and_authorize_resource
@@ -9,9 +9,6 @@ class DocumentsController < ApplicationController
def new
end
def new_nested
end
def create
recover_attachments_from_cache