Fix abilities definition and related specs
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
class DocumentsController < ApplicationController
|
||||
before_action :authenticate_user!
|
||||
before_filter :find_documentable, except: [:destroy]
|
||||
before_filter :prepare_new_document, only: :new
|
||||
before_filter :prepare_new_document, only: [:new, :new_nested]
|
||||
before_filter :prepare_document_for_creation, only: :create
|
||||
|
||||
load_and_authorize_resource :except => [:upload]
|
||||
@@ -10,6 +10,9 @@ class DocumentsController < ApplicationController
|
||||
def new
|
||||
end
|
||||
|
||||
def new_nested
|
||||
end
|
||||
|
||||
def create
|
||||
recover_attachment_from_cache
|
||||
if @document.save
|
||||
|
||||
Reference in New Issue
Block a user