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

@@ -38,7 +38,7 @@ module Abilities
can [:create, :destroy], Follow
can [:create, :destroy, :new], Document, documentable: { author_id: user.id }
can [:new_nested, :upload, :destroy_upload], Document
can [:upload, :destroy_upload], Document
can [:create, :destroy, :new], Image, imageable: { author_id: user.id }
can [:new_nested, :upload, :destroy_upload], Image