How can i call an instance variable?

Ivan Santana
Mon, 25 Jul 2011 01:38:27 -0000

Hi, Im reading an old tutorial about instance variables.

However i wasnt able to call de instance variable from the CONTROLLER to
the VIEW.

The code is:
----------------------------------
VIEW :



title


line 1
<%= @text %>




--------------------------------
CONTROLLER:

class MoviesController < ApplicationController
  def movies
    @text = "movietitle"
  end
end

---------------------------------

When i load the page, it only shows the line 1 paragraph.

How can i call the instance variable @TEST?

--
Posted via http://www.ruby-forum.com/.