Sometime we will write my custom code that maybe is a class or function,
and
then use this code we need at certain moment.
So, where to store the code ? how and where to import my custom code?
Could
you give a example for explaining ?
Sometime we will write my custom code that maybe is a class or function, and
then use this code we need at certain moment.
So, where to store the code ? how and where to import my custom code? Could
you give a example for explaining ?
Place it on the lib/ directory.
Then, require it where you need it.
Hope it helps.
–
Leonardo M…
There’s no place like ~
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.