Move map_location attributes to concern
This commit is contained in:
@@ -3,6 +3,7 @@ class ProposalsController < ApplicationController
|
||||
include CommentableActions
|
||||
include FlagActions
|
||||
include ImageAttributes
|
||||
include MapLocationAttributes
|
||||
include Translatable
|
||||
|
||||
before_action :load_categories, only: [:index, :new, :create, :edit, :map, :summary]
|
||||
@@ -103,7 +104,7 @@ class ProposalsController < ApplicationController
|
||||
image_attributes: image_attributes,
|
||||
documents_attributes: [:id, :title, :attachment, :cached_attachment,
|
||||
:user_id, :_destroy],
|
||||
map_location_attributes: [:latitude, :longitude, :zoom]]
|
||||
map_location_attributes: map_location_attributes]
|
||||
translations_attributes = translation_params(Proposal, except: :retired_explanation)
|
||||
params.require(:proposal).permit(attributes, translations_attributes)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user