removes question column from poll_questions
This commit is contained in:
@@ -40,7 +40,6 @@ class Poll::Question < ActiveRecord::Base
|
||||
self.title = proposal.title
|
||||
self.description = proposal.description
|
||||
self.summary = proposal.summary
|
||||
self.question = proposal.question
|
||||
self.all_geozones = true
|
||||
self.valid_answers = I18n.t('poll_questions.default_valid_answers')
|
||||
end
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
<div class="small-12 column">
|
||||
<%= f.text_field :title, maxlength: Poll::Question.title_max_length %>
|
||||
|
||||
<%= f.text_field :question, maxlength: Poll::Question.question_max_length %>
|
||||
|
||||
<%= f.text_field :valid_answers %>
|
||||
|
||||
<%= f.text_area :summary, rows: 4, maxlength: 200 %>
|
||||
|
||||
@@ -69,6 +69,12 @@ en:
|
||||
external_url: "Link to additional documentation"
|
||||
geozone_id: "Scope of operation"
|
||||
title: "Title"
|
||||
poll/question:
|
||||
title: "Question"
|
||||
valid_answers: "Posibles answers"
|
||||
summary: "Summary"
|
||||
description: "Description"
|
||||
external_url: "Link to additional documentation"
|
||||
errors:
|
||||
models:
|
||||
user:
|
||||
|
||||
@@ -70,8 +70,7 @@ es:
|
||||
geozone_id: "Ámbito de actuación"
|
||||
title: "Título"
|
||||
poll/question:
|
||||
title: "Título"
|
||||
question: "Pregunta"
|
||||
title: "Pregunta"
|
||||
valid_answers: "Posibles respuestas"
|
||||
summary: "Resumen"
|
||||
description: "Descripción"
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
class RemoveQuestionFromPollQuestions < ActiveRecord::Migration
|
||||
def change
|
||||
remove_column :poll_questions, :question
|
||||
end
|
||||
end
|
||||
@@ -11,7 +11,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20161107174423) do
|
||||
ActiveRecord::Schema.define(version: 20161122101702) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
@@ -314,7 +314,6 @@ ActiveRecord::Schema.define(version: 20161107174423) do
|
||||
t.integer "author_id"
|
||||
t.string "author_visible_name"
|
||||
t.string "title"
|
||||
t.string "question"
|
||||
t.string "summary"
|
||||
t.string "valid_answers"
|
||||
t.text "description"
|
||||
|
||||
@@ -20,7 +20,6 @@ RSpec.describe Poll::Question, type: :model do
|
||||
expect(q.author_visible_name).to eq(p.author.name)
|
||||
expect(q.proposal_id).to eq(p.id)
|
||||
expect(q.title).to eq(p.title)
|
||||
expect(q.question).to eq(p.question)
|
||||
expect(q.all_geozones).to be_true
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user