The app directory isn't marked as safe => a test fails for accessing nil
Not sure how there's only 1 test failing because of this.
Either way, this is more correct
This removes the need for all the ruby-lsp setup stuff.
ruby-lsp will try to install the debug gem which contains native code, add that to the gemfile so it doesn't cause trouble.
I'm probably going to remove the rubocop/test compose services at some point. With devcontainers you are just able to run the commands directly.
Also adds back something to .env.sample that I accidentally removed last commit.
The installation instructions to properly set up ruby-lsp are pretty convoluted at the moment,
I'm hoping that this will improve in the future. I openend https://github.com/Shopify/ruby-lsp/issues/1303 Let's see how that goes
It just works.
Requires a bit of a workaround for the .rubocop.yml env setup currently in use but thats alright.
The companion ruby-lsp-rails doesn't do much right now but I imagine that to become quite powerful in the future.
* [UserWarnable] fix `warning_user_id` never being set
I know `update` & `update_columns` function differently, but I feel the difference isn't needed
* [UserWarnable] Add inline user and timestamp
* lint
* Move warning info into partial
Also removes the user/timestamp as that is redundant for now
* Fix unmarking
* Tweak fixer script
---------
Co-authored-by: Earlopain <14981592+Earlopain@users.noreply.github.com>
* [Tests] Add hide & delete modaction tests to comments and forum posts
* [ForumPosts] Remove user id check on destroy
* [ForumPosts] Don't create edit modaction on hide
* Assert correct amount of ModActions is created
Especially important when it previously created 2 instead of 1 for hiding
---------
Co-authored-by: Earlopain <14981592+Earlopain@users.noreply.github.com>
* [ModActions] Ban Update Mod Action
* Add back accidentally removed newline
* Log expiration for user_ban_update ModAction
The duration in days makes sense on creation but it falls apart when updating
For this to correctly work the duration needs to be persisted as well
which it isn't at the moment.
---------
Co-authored-by: Earlopain <14981592+Earlopain@users.noreply.github.com>
* [ForumPosts] Check for existence of topic & category
* [Tests] Add invalid topic category_id test
* Tweak how it is getting validated
If the category doesn't exist there's not point in doing anything further
* Move response assert before the other one
Should always be that way. If the response doesn't have the expected format
the assert will for sure fail and produce a confusing error message
---------
Co-authored-by: Earlopain <14981592+Earlopain@users.noreply.github.com>