Enable soft deletion of Comment::Translations
This commit is contained in:
committed by
voodoorai2000
parent
16b3ec6e5f
commit
4ce006ec96
@@ -0,0 +1,6 @@
|
||||
class AddHiddenAtToCommentTranslations < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :comment_translations, :hidden_at, :datetime
|
||||
add_index :comment_translations, :hidden_at
|
||||
end
|
||||
end
|
||||
@@ -421,7 +421,9 @@ ActiveRecord::Schema.define(version: 20190607160900) do
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.text "body"
|
||||
t.datetime "hidden_at"
|
||||
t.index ["comment_id"], name: "index_comment_translations_on_comment_id", using: :btree
|
||||
t.index ["hidden_at"], name: "index_comment_translations_on_hidden_at", using: :btree
|
||||
t.index ["locale"], name: "index_comment_translations_on_locale", using: :btree
|
||||
end
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ describe Comment do
|
||||
|
||||
it_behaves_like "has_public_author"
|
||||
it_behaves_like "globalizable", :comment
|
||||
it_behaves_like "acts as paranoid", :comment
|
||||
|
||||
it "is valid" do
|
||||
expect(comment).to be_valid
|
||||
|
||||
Reference in New Issue
Block a user