Variable Losing it's Value

I fired up my rails app after a few weeks, only to find it was broken,
in that the variable seems to be losing it’s value somewhere between the
controller and the view. I’ve broken it down to the absolute simplest
test, and here is what I get:

THE CONTROLLER (controllers/visits_controller.rb)
class VisitsController < ApplicationController
def list
@test = “test”
end
end

THE VIEW (views/visits/list.rhtml)
Testing: <%= @test %>

THE RESULT (http://logapp/visits/list.rhtml)
Testing:

EXPECTED REUSULT
Testing: test

A ‘@test.inspect’ returns ‘nil’. Any ideas? Thanks.

Not sure if you’ve just made a typo… but lose the “.rhtml” off the
url.

Cheers
-h

Hi –

On Tue, 11 Jul 2006, Joel wrote:

end

A ‘@test.inspect’ returns ‘nil’. Any ideas? Thanks.

Drop “.rhtml” from the URL.

David


http://www.rubypowerandlight.com => Ruby/Rails training & consultancy
Ruby for Rails => RUBY FOR RAILS, the Ruby book for
Rails developers
http://dablog.rubypal.com => D[avid ]A[. ]B[lack’s][ Web]log
[email protected] => me

[email protected] wrote:

Drop “.rhtml” from the URL.

Excellent! Can’t believe I missed that. Duh ;-(

Best regards,
Bill

Yep, that did the trick. Thanks for the help.

Joel