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

This commit is contained in:
Senén Rodero Rodríguez
2017-09-23 17:14:32 +02:00
parent 88a7a29d27
commit f8d78ec4ab
23 changed files with 263 additions and 268 deletions

View File

@@ -1,7 +1,7 @@
class ImagesController < ApplicationController
before_action :authenticate_user!
before_filter :find_imageable, except: :destroy
before_filter :prepare_new_image, only: [:new, :new_nested]
before_filter :prepare_new_image, only: [:new]
before_filter :prepare_image_for_creation, only: :create
load_and_authorize_resource
@@ -9,9 +9,6 @@ class ImagesController < ApplicationController
def new
end
def new_nested
end
def create
recover_attachments_from_cache