Refactor various ruby files

* Insights based on brakeman report
This commit is contained in:
Sebastian Serth
2022-08-18 15:06:36 +02:00
parent 1560f6b316
commit 145c4aa8d5
35 changed files with 113 additions and 107 deletions

View File

@@ -1,4 +1,5 @@
- if model = Kernel.const_get(controller_path.classify) rescue nil
- model = controller_path.classify.constantize rescue nil
- if model
- object = model.find_by(id: params[:id])
- if model.try(:nested_resource?)
- root_element = model.model_name.human(count: 2)