If I understand what you’re trying to do correctly, you will need to create a plugin to make that modification (or fork the entire discourse repo and use that in your app.yml, but that is absolutely not recommended).
I know, “plugin” sounds like overkill because it’s a big word. But all a plugin really does it modifies/amends discourse’s code, which is exactly what you’re trying to do, right? Of course you can do so much more with plugins than change 2 lines of code, but changing those two lines is entirely possible and not overkill at all. It’s pretty much the same as what you’ve tried, only the “proper” way. It’s so easy that even I was able to do it:
Check out that topic and see if you can make it work for your case.
Permíteme hablar desde mi experiencia personal sobre por qué modificar el código fuente es una mala idea. Antes de trabajar en Discourse, trabajé para una empresa que lo utilizaba internamente. Habían vinculado Discourse con una instalación de WordPress y, en lugar de usar la API para conectar WordPress con Discourse, decidieron agregar una ruta personalizada a Discourse. Lo hicieron copiando el archivo routes.rb, añadiendo la nueva ruta y luego sobrescribiendo el archivo routes.rb cada vez que Discourse se actualizaba. A medida que Discourse añadía nuevas rutas, estas eran “eliminadas” por el archivo routes.rb modificado que lo sobrescribía. Eventualmente, la ruta de la página de inicio fue modificada y la sobrescribimos durante una actualización, lo que provocó que Discourse lanzara errores con frecuencia.
El archivo fue modificado a mediados de 2016. Empezamos a ver errores a mediados de 2017. Nos llevó casi una semana rastrear la causa de los errores, porque asumimos que algo había cambiado recientemente, y no algo que no se había tocado en un año.
tl;dr: No modifiques archivos directamente. Incluso si no te causan problemas hoy, pueden volver a darte un susto cuando menos lo esperes.
I am not a coder either. Did you read the topics linked in the previous posts?
There is always room for improvement, but I don’t think that’s a fair assessment. You are trying to customize discourse beyond what is foreseen in the UI (which is very easy to use). If you want to “hack” a software, you can’t really blame it for that being difficult.
Besides, the community here is usually quite helpful…