have a folder with proprietary classes(ex: propcode) with some classes in it(ex: propclass.rb), where should I put that folder and how to require inside controllers?
The classes does not have modules and I can’t change them because would brake another applications.
Thank you, I’m new to ruby and have been trying and failing for almost an hour now.
The best place to put files like this would be
lib/propcode.If you are only going to use the code in your controller, then you should require it at the top of
app/controllers/application_controller.rbwith the following code:Then you will be able to use these classes in your controller, and they won’t be loaded for Rake tasks or background jobs.