Hi,
When running the script/console I can’t run the model.
Example:
I have model Probe.
So, running:
Probe.class will not work, because Probe is not loaded.
I tried to build some projects from scratch automatically generated,
but the problem stays.
Any thoughts?
Hi,
When running the script/console I can’t run the model.
Example:
I have model Probe.
So, running:
Probe.class will not work, because Probe is not loaded.
I think that ActiveRecord loads the models on demand only. So when you
try to
access the “Probe” class, the system will fetch the file named
app/models/probe.rb from the root of your rails application.
Hi,
When running the script/console I can’t run the model.
Example:
I have model Probe.
So, running:
Probe.class will not work, because Probe is not loaded.
I tried to build some projects from scratch automatically generated,
but the problem stays.
Any thoughts?
try entering this in console…
require “app/models/probe.rb”
Craig
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.