I was wondering if we could use Helpers as class in Rails.
The interpreter requires helper to be a Module, but I want it as a class.
I have two solutions :
module ModHelper
class C
#stuff
end
end
Which impose me to write ModHelper::C.my_method instead of ModHelper.my_method …
Or :
module ModHelper
#nothing
end
class C
#stuff
end
Which is a bit dirty.
Is someone have a better solution ?
I just realized that you can just do
ShortName = MyModule::UselessName.