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.title = proposal.title
|
||||||
self.description = proposal.description
|
self.description = proposal.description
|
||||||
self.summary = proposal.summary
|
self.summary = proposal.summary
|
||||||
self.question = proposal.question
|
|
||||||
self.all_geozones = true
|
self.all_geozones = true
|
||||||
self.valid_answers = I18n.t('poll_questions.default_valid_answers')
|
self.valid_answers = I18n.t('poll_questions.default_valid_answers')
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -9,8 +9,6 @@
|
|||||||
<div class="small-12 column">
|
<div class="small-12 column">
|
||||||
<%= f.text_field :title, maxlength: Poll::Question.title_max_length %>
|
<%= 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_field :valid_answers %>
|
||||||
|
|
||||||
<%= f.text_area :summary, rows: 4, maxlength: 200 %>
|
<%= f.text_area :summary, rows: 4, maxlength: 200 %>
|
||||||
|
|||||||
@@ -69,6 +69,12 @@ en:
|
|||||||
external_url: "Link to additional documentation"
|
external_url: "Link to additional documentation"
|
||||||
geozone_id: "Scope of operation"
|
geozone_id: "Scope of operation"
|
||||||
title: "Title"
|
title: "Title"
|
||||||
|
poll/question:
|
||||||
|
title: "Question"
|
||||||
|
valid_answers: "Posibles answers"
|
||||||
|
summary: "Summary"
|
||||||
|
description: "Description"
|
||||||
|
external_url: "Link to additional documentation"
|
||||||
errors:
|
errors:
|
||||||
models:
|
models:
|
||||||
user:
|
user:
|
||||||
|
|||||||
@@ -70,8 +70,7 @@ es:
|
|||||||
geozone_id: "Ámbito de actuación"
|
geozone_id: "Ámbito de actuación"
|
||||||
title: "Título"
|
title: "Título"
|
||||||
poll/question:
|
poll/question:
|
||||||
title: "Título"
|
title: "Pregunta"
|
||||||
question: "Pregunta"
|
|
||||||
valid_answers: "Posibles respuestas"
|
valid_answers: "Posibles respuestas"
|
||||||
summary: "Resumen"
|
summary: "Resumen"
|
||||||
description: "Descripción"
|
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.
|
# 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
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
@@ -314,7 +314,6 @@ ActiveRecord::Schema.define(version: 20161107174423) do
|
|||||||
t.integer "author_id"
|
t.integer "author_id"
|
||||||
t.string "author_visible_name"
|
t.string "author_visible_name"
|
||||||
t.string "title"
|
t.string "title"
|
||||||
t.string "question"
|
|
||||||
t.string "summary"
|
t.string "summary"
|
||||||
t.string "valid_answers"
|
t.string "valid_answers"
|
||||||
t.text "description"
|
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.author_visible_name).to eq(p.author.name)
|
||||||
expect(q.proposal_id).to eq(p.id)
|
expect(q.proposal_id).to eq(p.id)
|
||||||
expect(q.title).to eq(p.title)
|
expect(q.title).to eq(p.title)
|
||||||
expect(q.question).to eq(p.question)
|
|
||||||
expect(q.all_geozones).to be_true
|
expect(q.all_geozones).to be_true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user