Accessing models from lib

Anyone tried to access the model class from a module in the lib
How should the require line look like?

I have class called A::Folder in app/models/a/folder.rb, and I was
to include it in app/lib/common.rb by adding

require “a/folder”

But I am getting the following error:

NameError (uninitialized constant Folder):

Did you try

require “models/a/folder”

That’s what I’ve been using for other pieces of my model.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs