The Discourse forum engine does not use bbCode. See:
… becuase you ae defining the method in the global ObjectSpace, which is class Object. This means your method definition will get added to everything as everything in Ruby is an object of some class that inherits from Object.
And, of course it seems to work, as global methods are just that, accessible from every scope because they are insinuated into everything.
You have not yet understood the difference between instance methods and module methods.
In your first file, you define a module method that requires qualification (self.method_name or from outside … MyNameSpace::MyModels.method_name.)
In your second file, you define an instance method without qualification.
If you would like to call any method from within your submodule (in any of it’s files,) without qualification, then in the first file, at the top of the submodule, add a statement to mix the submodule into itself …
module MyNameSpace
module MyModels
extend self
# Define instance methods ...
See: Object#extend
… and chapters on mixin modules in any good Ruby book.