Enable soft_deletion of Poll::Translations

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

View File

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

View File

@@ -1223,6 +1223,8 @@ ActiveRecord::Schema.define(version: 20190607160900) do
t.string "name" t.string "name"
t.text "summary" t.text "summary"
t.text "description" t.text "description"
t.datetime "hidden_at"
t.index ["hidden_at"], name: "index_poll_translations_on_hidden_at", using: :btree
t.index ["locale"], name: "index_poll_translations_on_locale", using: :btree t.index ["locale"], name: "index_poll_translations_on_locale", using: :btree
t.index ["poll_id"], name: "index_poll_translations_on_poll_id", using: :btree t.index ["poll_id"], name: "index_poll_translations_on_poll_id", using: :btree
end end

View File

@@ -6,6 +6,7 @@ describe Poll do
describe "Concerns" do describe "Concerns" do
it_behaves_like "notifiable" it_behaves_like "notifiable"
it_behaves_like "acts as paranoid", :poll
it_behaves_like "reportable" it_behaves_like "reportable"
end end