lib/modules/file_type.rb
module Modules
  module Type
    def friend_name(type:)
      ...
    end
  end
end
app/models/car.rb
class Car < ApplicationRecord
  include Modules::Type
  def self.to_array
  ...
  name = friend_name(type: 'test')
  ...
  end
end
But I am getting this error:
undefined method `friend_name'
I am not sure why I am getting this error.
Anyone can help me?
 
    