Rails + require returns []?

All,

I have a rails controller that is requiring a ruby file

ie

res = require ‘blee’
p res.inspect # <= [] ??

class FredController < ApplicationController

end

Printing the return value of the require, I was expecting to see
true or false whether
the required ruby file was previously loaded or not. Instead it
seems to always return an array.

On the first load an array with the module name for blee and on
reload an empty array…

As anyone experienced this before ?

Thanks !!

Why accept true or false from required file :S

Just call a function from required file which return true or false, this
is better solution :slight_smile: