Just like servlet context in java web development.
In rails 1.1.6, the latest version on rubyforge.org, I can do like
this:
create a model without database tables bar.rb
class Bar
@@v=0
def inc
@@v+=1
end
end
and create a controller foo_controller.rb
class FooController < ApplicationController
def index
render_text Bar.new.to_s
end
end
This works on different sessions or browsers.
But it doesn’t work with Rails 1.2rc1 (1.1.6.5618). Why?
Are there something changed in 1.2rc1?
How can I do the same thing in 1.2rc1?