Add _destroy parameter to nested image
This commit is contained in:
@@ -80,7 +80,7 @@ class ProposalsController < ApplicationController
|
||||
def proposal_params
|
||||
params.require(:proposal).permit(:title, :question, :summary, :description, :external_url, :video_url,
|
||||
:responsible_name, :tag_list, :terms_of_service, :geozone_id,
|
||||
image_attributes: [:id, :title, :attachment, :cached_attachment, :user_id],
|
||||
image_attributes: [:id, :title, :attachment, :cached_attachment, :user_id, :_destroy],
|
||||
documents_attributes: [:id, :title, :attachment, :cached_attachment, :user_id, :_destroy] )
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user