Enable soft_deletion of Legislation::Question::Translations

This commit is contained in:
Senén Rodero Rodríguez
2019-01-21 13:28:26 +01:00
committed by voodoorai2000
parent e0649f983f
commit 441f0773a6
3 changed files with 10 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
class AddHiddenAtToLegislationQuestionTranslations < ActiveRecord::Migration[4.2]
def change
add_column :legislation_question_translations, :hidden_at, :datetime
add_index :legislation_question_translations, :hidden_at
end
end

View File

@@ -902,6 +902,8 @@ ActiveRecord::Schema.define(version: 20190607160900) do
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.text "title" t.text "title"
t.datetime "hidden_at"
t.index ["hidden_at"], name: "index_legislation_question_translations_on_hidden_at", using: :btree
t.index ["legislation_question_id"], name: "index_d34cc1e1fe6d5162210c41ce56533c5afabcdbd3", using: :btree t.index ["legislation_question_id"], name: "index_d34cc1e1fe6d5162210c41ce56533c5afabcdbd3", using: :btree
t.index ["locale"], name: "index_legislation_question_translations_on_locale", using: :btree t.index ["locale"], name: "index_legislation_question_translations_on_locale", using: :btree
end end

View File

@@ -3,6 +3,8 @@ require "rails_helper"
describe Legislation::Question do describe Legislation::Question do
let(:question) { create(:legislation_question) } let(:question) { create(:legislation_question) }
it_behaves_like "acts as paranoid", :legislation_question
describe "Concerns" do describe "Concerns" do
it_behaves_like "notifiable" it_behaves_like "notifiable"
end end