diff --git a/app/controllers/legislation/proposals_controller.rb b/app/controllers/legislation/proposals_controller.rb index 4da2cb62146..944a4f6aa7a 100644 --- a/app/controllers/legislation/proposals_controller.rb +++ b/app/controllers/legislation/proposals_controller.rb @@ -53,7 +53,7 @@ def vote def proposal_params params.require(:legislation_proposal).permit(:legislation_process_id, :title, - :question, :summary, :description, :video_url, :tag_list, + :summary, :description, :video_url, :tag_list, :terms_of_service, :geozone_id, image_attributes: image_attributes, documents_attributes: [:id, :title, :attachment, :cached_attachment, :user_id]) diff --git a/app/controllers/management/proposals_controller.rb b/app/controllers/management/proposals_controller.rb index 2c497299a58..f24e9430307 100644 --- a/app/controllers/management/proposals_controller.rb +++ b/app/controllers/management/proposals_controller.rb @@ -52,9 +52,9 @@ def set_proposal end def proposal_params - params.require(:proposal).permit(:title, :question, :summary, :description, :external_url, - :video_url, :responsible_name, :tag_list, :terms_of_service, - :geozone_id, :skip_map, + params.require(:proposal).permit(:title, :summary, :description, :video_url, + :responsible_name, :tag_list, :terms_of_service, :geozone_id, + :skip_map, map_location_attributes: [:latitude, :longitude, :zoom]) end diff --git a/app/controllers/proposals_controller.rb b/app/controllers/proposals_controller.rb index 4372ecc63ea..5cc9b7e10fe 100644 --- a/app/controllers/proposals_controller.rb +++ b/app/controllers/proposals_controller.rb @@ -96,8 +96,8 @@ def publish private def proposal_params - params.require(:proposal).permit(:title, :question, :summary, :description, :external_url, - :video_url, :responsible_name, :tag_list, :terms_of_service, + params.require(:proposal).permit(:title, :summary, :description, :video_url, + :responsible_name, :tag_list, :terms_of_service, :geozone_id, :skip_map, image_attributes: image_attributes, documents_attributes: [:id, :title, :attachment, :cached_attachment, :user_id, :_destroy], diff --git a/app/models/legislation/proposal.rb b/app/models/legislation/proposal.rb index 16ab2d7dd98..d6fdf5eb31f 100644 --- a/app/models/legislation/proposal.rb +++ b/app/models/legislation/proposal.rb @@ -60,7 +60,6 @@ def to_param def searchable_values { title => "A", - question => "B", author.username => "B", tag_list.join(" ") => "B", geozone.try(:name) => "B", diff --git a/app/models/proposal.rb b/app/models/proposal.rb index dd72d517329..dfc81e2ea7d 100644 --- a/app/models/proposal.rb +++ b/app/models/proposal.rb @@ -38,14 +38,12 @@ class Proposal < ApplicationRecord has_many :polls, as: :related validates :title, presence: true - validates :question, presence: true validates :summary, presence: true validates :author, presence: true validates :responsible_name, presence: true, unless: :skip_user_verification? validates :title, length: { in: 4..Proposal.title_max_length } validates :description, length: { maximum: Proposal.description_max_length } - validates :question, length: { in: 10..Proposal.question_max_length } validates :responsible_name, length: { in: 6..Proposal.responsible_name_max_length }, unless: :skip_user_verification? validates :retired_reason, inclusion: { in: RETIRE_OPTIONS, allow_nil: true } @@ -117,7 +115,6 @@ def to_param def searchable_values { title => "A", - question => "B", author.username => "B", tag_list.join(" ") => "B", geozone.try(:name) => "B", diff --git a/app/views/admin/hidden_proposals/index.html.erb b/app/views/admin/hidden_proposals/index.html.erb index c0af9bc596e..4e23b8c5b3d 100644 --- a/app/views/admin/hidden_proposals/index.html.erb +++ b/app/views/admin/hidden_proposals/index.html.erb @@ -22,13 +22,9 @@

<%= proposal.summary %>

<%= proposal.description %> - <% if proposal.external_url.present? %> -

<%= text_with_links proposal.external_url %>

- <% end %> <% if proposal.video_url.present? %>

<%= text_with_links proposal.video_url %>

<% end %> -

<%= proposal.question %>

diff --git a/app/views/admin/poll/questions/_successful_proposals.html.erb b/app/views/admin/poll/questions/_successful_proposals.html.erb index 4f3fda4d55d..f58c84d25c6 100644 --- a/app/views/admin/poll/questions/_successful_proposals.html.erb +++ b/app/views/admin/poll/questions/_successful_proposals.html.erb @@ -12,7 +12,6 @@ <%= link_to proposal.title, proposal_path(proposal) %>

<%= proposal.summary %>
- <%= proposal.question %>

diff --git a/app/views/documents/_additional_documents.html.erb b/app/views/documents/_additional_documents.html.erb index dc73f33f432..b4b23a1a0df 100644 --- a/app/views/documents/_additional_documents.html.erb +++ b/app/views/documents/_additional_documents.html.erb @@ -4,7 +4,7 @@
diff --git a/app/views/legislation/proposals/show.html.erb b/app/views/legislation/proposals/show.html.erb index 7d8d1868743..e8e213b0613 100644 --- a/app/views/legislation/proposals/show.html.erb +++ b/app/views/legislation/proposals/show.html.erb @@ -59,16 +59,6 @@ <%= safe_html_with_links @proposal.description %> - <% if @proposal.external_url.present? %> - - <% end %> - <% if @proposal.video_url.present? %>