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

@@ -5,6 +5,7 @@ module Budgets
include FlagActions
include RandomSeed
include ImageAttributes
include DocumentAttributes
include MapLocationAttributes
include Translatable
include InvestmentFilters
@@ -136,7 +137,7 @@ module Budgets
attributes = [:heading_id, :tag_list, :organization_name, :location,
:terms_of_service, :skip_map, :related_sdg_list,
image_attributes: image_attributes,
documents_attributes: [:id, :title, :attachment, :cached_attachment, :user_id, :_destroy],
documents_attributes: document_attributes,
map_location_attributes: map_location_attributes]
params.require(:budget_investment).permit(attributes, translation_params(Budget::Investment))
end