Enable soft_deletion of Budget::Investment::Translations

This commit is contained in:
Senén Rodero Rodríguez
2019-01-23 13:24:47 +01:00
committed by voodoorai2000
parent ef786d0658
commit f116477d6d
3 changed files with 9 additions and 0 deletions

View File

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

View File

@@ -241,7 +241,9 @@ ActiveRecord::Schema.define(version: 20190607160900) do
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "title" t.string "title"
t.text "description" t.text "description"
t.datetime "hidden_at"
t.index ["budget_investment_id"], name: "index_budget_investment_translations_on_budget_investment_id", using: :btree t.index ["budget_investment_id"], name: "index_budget_investment_translations_on_budget_investment_id", using: :btree
t.index ["hidden_at"], name: "index_budget_investment_translations_on_hidden_at", using: :btree
t.index ["locale"], name: "index_budget_investment_translations_on_locale", using: :btree t.index ["locale"], name: "index_budget_investment_translations_on_locale", using: :btree
end end

View File

@@ -8,6 +8,7 @@ describe Budget::Investment do
it_behaves_like "sanitizable" it_behaves_like "sanitizable"
it_behaves_like "globalizable", :budget_investment it_behaves_like "globalizable", :budget_investment
it_behaves_like "acts as imageable", :budget_investment_image it_behaves_like "acts as imageable", :budget_investment_image
it_behaves_like "acts as paranoid", :budget_investment
end end
it "is valid" do it "is valid" do