Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove question and external_url fields from proposals and legislation proposals #3397

Merged
merged 5 commits into from
May 17, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove question and external_url fields from legislation proposals
  • Loading branch information
decabeza committed Apr 30, 2019
commit 5bdac5c4f56d253ab8a1f92942e0f51874345311
2 changes: 1 addition & 1 deletion app/controllers/legislation/proposals_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
1 change: 0 additions & 1 deletion app/models/legislation/proposal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 0 additions & 12 deletions app/views/legislation/proposals/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,6 @@

<%= safe_html_with_links @proposal.description %>

<% if @proposal.external_url.present? %>
<div class="document-link">
<p>
<span class="icon-document"></span>&nbsp;
<strong><%= t("proposals.show.title_external_url") %></strong>
</p>
<%= text_with_links @proposal.external_url %>
</div>
<% end %>

<% if @proposal.video_url.present? %>
<div class="video-link">
<p>
Expand All @@ -80,8 +70,6 @@

<% end %>

<h4><%= @proposal.question %></h4>

<% if feature?(:allow_attached_documents) %>
<%= render "documents/documents",
documents: @proposal.documents,
Expand Down
1 change: 0 additions & 1 deletion db/dev_seeds/legislation_proposals.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
10.times do
Legislation::Proposal.create!(title: Faker::Lorem.sentence(3).truncate(60),
description: Faker::Lorem.paragraphs.join("\n\n"),
question: Faker::Lorem.sentence(3),
summary: Faker::Lorem.paragraph,
author: User.all.sample,
process: Legislation::Process.all.sample,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class RemoveQuestionAndExternalUrlFromLegislationProposals < ActiveRecord::Migration
def change
remove_column :legislation_proposals, :question, :string
remove_column :legislation_proposals, :external_url, :string
end
end
1 change: 0 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,6 @@
t.integer "legislation_process_id"
t.string "title", limit: 80
t.text "description"
t.string "question"
t.integer "author_id"
t.datetime "hidden_at"
t.integer "flags_count", default: 0
Expand Down