Resolve runtime bugs, dead code, and useless assignments across BrainPortal#1610
Conversation
Signed-off-by: RafsanNeloy <rafsanneloy@gmail.com>
|
Sure, this all seems fine. How did you find all of this? Did you use some AI code scanning tool? As a side note, the change to inject() wasn't necessary, because in Ruby a block like a.inject { |total,x| total + x }works just as well as a.inject { |total,x| total += x }since the inject() method always re-assigns the block's returned value to total anyway. |
|
Never mind about my first comment, I was reading things backwards and you changed some "+=" INTO "+" instead. |
|
I reviewed all the changes and they are all approved. At the same time, I discovered other bugs in the code, so I will make a commit after this is merged. |
Yes, Actually I use different extentions like Code Spell Checker or Trunk Code Quality to check the typo of code in which file I visit. I'm currently understanding the cbrain api endpoints and the codebase, so some files has the typo and errors are showing in the files. That's why actually |
Fixes a NoMethodError caused by detect? (non-existent method), a typo
sefltoselfin Messagerender_attr, a wrong file path in File.size() insideextract_from_archive, and a variable name mixup intools_controllerthat leaked inaccessible bourreau tool configs. Also removes useless assignments inside inject blocks and dead reqenv variables across controllers and models. Also removed line(479-480) frombourreaux_controller.rb