In Rails, if I create a scaffold foo
, and do rake db:migrate
, then now
app/models/foo.rb
is created. So if I go to
script/console (or rails console for Rails 3)
and type
$".grep /foo/i
it is empty. $"
is the loaded files. So foo.rb is not loaded yet.
Now I do a Foo.all
, and foo.rb should be loaded now.
But when I repeat the grep
, it is still showing empty array -- why is that?
(On the other hand, I can grep for pp
, and it shows nothing, but after I require 'pp'
, then the grep shows it)