Hey,
Still trying to dissect plugins, I was looking to override TopicsController
in my studies and searched the Discourse code repo and noticed reloadable_patch
Then I searched for reloadable_patch
in Discourse, and got 12 code hits:
https://github.com/search?p=1&q=org%3Adiscourse+reloadable_patch&type=Code
So, I decided to look more broadly to try to understand this fascinating “method / hook (?)”, so I:
-
Searched all of Github:
– All results seem to be related to Discourse (plugins) -
Searched the web
– All results seem to be related to Discourse (plugins) -
Searched meta
– Got a few hits but nothing which explainedreloadable_patch
(internals) in details.
Next, I searched the Discourse repo again, and could not find (must be because I am not experienced at this) the “definition” of what, exactly reloadable_patch
does (or is defined).
It seems, to a Ruby rookie like me, to be a “method” for a lack of a better word, or a “hook” that facilitates overriding Discourse classes; but I could not find the Ruby code which defines how it works, internally.
Does someone mind to explain this to me or point me to the “defining code” which would explain what reloadable_patch
does, from a Ruby internals perspective?
Thanks!
Hopefully, I’m not being a PITA to ask !!