I plan to create a method that will format time in a certain way (specialized formatting in Russian).
I would like to reuse this helper method in several models, controllers, and possibly views. I would also like to call this helper method an instance of the Time class as follows:
t=Time.now
t.my_super_shiny_helper
Question: where should I implement this helper? (module or class, where in the structure of the application directory?). After its creation, what should I call it?
I am new to Ruby / rails and try to make this work properly.
Thanks.
source
share