I’m writing a Rails plugin from scratch and recently generating models
inside it.
In fact, i’m trying to follow the guide from
so i used the following code taken from this site in order to make the
models appear like files in the main app directory (as it was said)
this is the code:
%w{ models }.each do |dir|
path = File.join(File.dirname(FILE), ‘app’, dir)
$LOAD_PATH << path
ActiveSupport::Dependencies.load_paths << path
ActiveSupport::Dependencies.load_once_paths.delete(path)
end
When i run ‘rails console ’ this error appear
undefined method `load_paths’ for ActiveSupport::Dependencies:Module
(NoMethodError)
thanks for your help