Move document attributes to concern

This commit is contained in:
taitus
2021-04-09 11:27:00 +02:00
parent 82cd019b40
commit ac144d172d
8 changed files with 21 additions and 14 deletions

View File

@@ -1,4 +1,5 @@
class Admin::Dashboard::ActionsController < Admin::Dashboard::BaseController
include DocumentAttributes
helper_method :dashboard_action, :resource
def index
@@ -58,7 +59,7 @@ class Admin::Dashboard::ActionsController < Admin::Dashboard::BaseController
.permit(
:title, :description, :short_description, :request_to_administrators, :day_offset,
:required_supports, :order, :active, :action_type, :published_proposal,
documents_attributes: [:id, :title, :attachment, :cached_attachment, :user_id, :_destroy],
documents_attributes: document_attributes,
links_attributes: [:id, :label, :url, :_destroy]
)
end