THE SITUATION:
I have code in
lib/foo/bar.rb
with a simple method defined as such:module Foo class Bar def test "FooBar" end end end
In my helper,
FooBarHelper
, I have:require `lib/foo/bar` module FooBarHelper def test_foo_bar fb = Foo::Bar.new fb.test end end
In my view, I call this helper method like so:
<%= test_foo_bar =>
In my
config/environments/development.rb
, I added the directory to myconfig.autoload_paths
:config.autoload_paths += ["#{config.root}/lib/foo"]
THE PROBLEM:
When I change the return value of Foo::Bar.test
to, for example, "MODIFIED FOOBAR"
, the original return value, "FooBar"
, is still being displayed on the view and not the new value.
Since I'm in development mode, shouldn't the code reload the code on every request?
Could someone tell me what I'm missing?
Thanks!