docbrown/db/migrate/20191210144342_add_any_comments_hidden_to_articles.rb
Andy Zhao 71157c993e Hide comment feature (#4944)
* Add MVP of hide comment feature

* Slight copy adjustments

* Remove unused file oops

* Fix strange styling issues

* Add hide/unhide comment specs

* Authenticate user for hide/unhide

* Add tests for hide/unhide functionality

* Remove opacity CSS for hidden comments

* Fix hidden comment explanation logic

* Fix some styling issues

* Fix hiding top level comment logic

* Show only hidden comments in permalink and not thread

* Hide subtree properly if hidden comment

* Fix weird CSS issue

* Properly hide comments for permalink view

* Show children comments in permalink view

* Add tests for comment hiding visibility

* Remove superfluous code and adjust copy

* Remove some more logical duplication

* Add dedicated article column for any comments hidden

* Add reload in test
2019-12-10 15:09:47 -05:00

6 lines
245 B
Ruby

class AddAnyCommentsHiddenToArticles < ActiveRecord::Migration[5.2]
def change
add_column :articles, :any_comments_hidden, :boolean, default: false
add_column :podcast_episodes, :any_comments_hidden, :boolean, default: false
end
end