The original code never set an edit_comment css class and the codebase has
never otherwise used one, so the 'if' always evaluated false. I confirmed this
fix worked because of the new show_tree_line param.
This reverts commit 71045a52ee.
This only has a small effect on js size and is flaky. Need a significantly
bigger change, like dropping jquery altogether.
* Update fake_data to create test Categories and pass those in to
new tags when created. Does not use find_and_create_by! for new
Tags since that could attempt to create another tag with the same
name if the random Category is different.
Update fake_data to use the newer Faker::Lorem syntax, specifying
the parameter name in .sentences() and .paragraphs().
* Update fake_data script to help troubleshoot flags.
Create users that are admins, as well as moderators.
Flag comments and stories from random users.
Add user karma and invite heirarchy.
* Add more realistic data, such as stories with links and text,
saved stories, user moderation, and hat moderation.
Signed-off-by: Three Planets Software <threeplanetssoftware@users.noreply.github.com>
* Add moderation of stories (merging and deleting) to fake data.
* Add story title edits to moderation fake data.
* Update fake_data to store comments and stories in Arrays, instead of
calling the database. Set default values for the generator method.
* fix merge conflicts
* rubocop
Co-authored-by: Peter Bhat Harkins <pushcx@users.noreply.github.com>
Saves me seeing a distracting 'event' on every element on the page. The latest
version of select2 (2021-01-23) is entirely rewritten so I don't want the risk
of an update.
This starts a Docker container running MariaDB instead of using the MySQL
database that GitHub Actions comes with. This means we can configure which
specific version of MariaDB to run.
I opted for MariaDB 10.5 as that was my best guess as to what version was
running in the deployed setup, based on it being the version available for the
"mariadb-server" package in Debian stable.
The Docker container is configured to create the "lobsters_dev" database
automatically, so it shouldn't be necessary to run a command to explicitly
create the database anymore.
Fixes#1050.
Following error happens when running fake_data task:
> ActiveRecord::RecordInvalid: Validation failed: Story is no longer accepting comments.
The fix is do not create deleted stories with is_deleted: true
immediately, but delete them after adding comments.